blob: 470c917f501473787e70ff06964a04d6f2c1203b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import java.util.*;
import java.io.*;
import java.net.*;
class T2 extends Thread
{
Socket s;
public T2(Socket socket)
{
s = socket;
}
public void run()
{
try
{
BufferedReader bw = new BufferedReader( new InputStreamReader(s.getInputStream()));
String str = "Connected";
do
{
System.out.printf("%s\n", str);
str = bw.readLine();
}while (str != null);
}catch(Exception e){
e.printStackTrace();
}
}
}
|