Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement