SHARE
TWEET

Untitled

a guest Jun 24th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Server {
  2.     public static void main(String[] args) {
  3.        
  4.         ServerSocket ss=null;
  5.         Socket s=null;
  6.        
  7.         ss=new ServerSocket(1943);
  8.         while(true)
  9.         {
  10.             s=ss.accept();
  11.             new Manage(ss,s).start();
  12.         }
  13.     }
  14. }
  15.  
  16. class Esempio extends Thread
  17. {
  18.     DataInputStream dis=null;
  19.     DataOutputStream dos=null;
  20.     ServerSocket ss=null;
  21.     Socket s=null;
  22.    
  23.     public Esempio(ServerSocket ss,Socket s)
  24.     {
  25.         this.s=s;
  26.         this.ss=ss;
  27.     }
  28.     public void run()
  29.     {
  30.         dis=new DataInputStream(s.getInputStream());
  31.         dos=new DataOutputStream(s.getOutputStream());
  32.  
  33.     }
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top