Advertisement
sindibadthesailor

Untitled

Mar 24th, 2023
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. package serveur_mt;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6. import java.io.PrintStream;
  7. import java.net.Socket;
  8.  
  9. public class Service extends Thread{
  10.    
  11.     private Socket socket;
  12.     private BufferedReader sin;
  13.     private PrintStream sout;
  14.    
  15.  
  16.     public Service(Socket client) {
  17.         socket=client;
  18.         try {
  19.          sin = new
  20.                 BufferedReader(new
  21.                 InputStreamReader(socket.getInputStream()));
  22.          sout = new PrintStream(socket.getOutputStream());
  23.          
  24.         }catch(IOException ioe) {
  25.            
  26.         }
  27.     }
  28.  
  29.     @Override
  30.     public void run() {
  31.        
  32.         super.run();
  33.     }
  34.  
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement