$ javac RunEchoServerThreaded.java ←コンパイル
$ java RunEchoServerThreaded ←実行
accept from /127.0.0.1
0: starts Socket[addr=/127.0.0.1,port=3534,localport=8888]
0: data=abc
accept from /127.0.0.1
1: starts Socket[addr=/127.0.0.1,port=3563,localport=8888]
1: data=123
1: closed Socket[addr=/127.0.0.1,port=3563,localport=8888]
1: ended
accept from /127.0.0.1
2: starts Socket[addr=/127.0.0.1,port=3567,localport=8888]
2: data=AAAA
0: data=def
2: data=BBB
2: closed Socket[addr=/127.0.0.1,port=3567,localport=8888]
2: ended
0: data=ghi
0: closed Socket[addr=/127.0.0.1,port=3534,localport=8888]
0: ended
|