-
Notifications
You must be signed in to change notification settings - Fork 0
/
prototype.java
37 lines (35 loc) · 903 Bytes
/
prototype.java
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
33
34
35
36
37
class prototype
{
static ServerTCP server;
static Thread t;
public static void main(String args[])
{
//the server Thread is initialized
server = new ServerTCP();
t = new Thread(server);
}
};
class DerverTCP implements Runnable
{
int PORT1;
static ClientTCP client;
static Thread t;
ServerSocket server;
Socket s;
ServerTCP(int port)
{
//starting the server of in this computer
server = new ServerSocket(PORT1)
//as the server has started functioning
client = new ClientTCP();
t = new Thread(client);
}
};
class ClientTCP implements Runnable
{
Socket client;
ClientTCP()
{
client
}
};