Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Server {
- public static void main(String[] args) {
- ServerSocket ss=null;
- Socket s=null;
- ss=new ServerSocket(1943);
- while(true)
- {
- s=ss.accept();
- new Manage(ss,s).start();
- }
- }
- }
- class Esempio extends Thread
- {
- DataInputStream dis=null;
- DataOutputStream dos=null;
- ServerSocket ss=null;
- Socket s=null;
- public Esempio(ServerSocket ss,Socket s)
- {
- this.s=s;
- this.ss=ss;
- }
- public void run()
- {
- dis=new DataInputStream(s.getInputStream());
- dos=new DataOutputStream(s.getOutputStream());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement