TCP<Server side>
2014. 6. 29. 16:57ㆍProgramming/Java
반응형
class outputThread extends Thread {
Socket aSocket;
ServerFrame serverFrame;
public outputThread(Socket sock, ServerFrame sf) {
aSocket = sock;
serverFrame = sf;
}
public void run() {
try {
ObjectInputStream instream = new ObjectInputStream(aSocket.getInputStream());
Object obj = instream.readObject();
serverFrame.area.append("Input : " + obj+"\n");
aSocket.close();
} catch(Exception ex) {
ex.printStackTrace();
}
}
}
반응형
'Programming > Java' 카테고리의 다른 글
Java로 RaspberryPi GPIO 제어하기!(CODE section) (0) | 2014.07.20 |
---|---|
TCP<Client side> (0) | 2014.06.29 |
UDP<Client side> (0) | 2014.06.29 |
UDP<Server side> (0) | 2014.06.29 |
자신의 IP 알아내기 (0) | 2014.06.23 |