2021-05-11 11:59:08 +00:00
|
|
|
/*
|
|
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
|
|
* To change this template file, choose Tools | Templates
|
|
|
|
* and open the template in the editor.
|
|
|
|
*/
|
|
|
|
package server;
|
|
|
|
|
|
|
|
import java.io.*;
|
|
|
|
import java.net.*;
|
2021-05-13 16:33:30 +00:00
|
|
|
import java.util.logging.Level;
|
|
|
|
import java.util.logging.Logger;
|
2021-05-11 11:59:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @author eichehome
|
|
|
|
*/
|
|
|
|
public class ServerHandelClientsThread extends Thread {
|
|
|
|
|
|
|
|
private Socket clientSocket = null;
|
|
|
|
private ClientMessageDistributorThread messageDistributor = null;
|
|
|
|
|
|
|
|
public void run() {
|
2021-05-13 16:33:30 +00:00
|
|
|
PrintWriter pr = null;
|
|
|
|
try {
|
|
|
|
pr = new PrintWriter(clientSocket.getOutputStream(), true);
|
|
|
|
InputStreamReader in = new InputStreamReader(clientSocket.getInputStream());
|
|
|
|
BufferedReader bf = new BufferedReader(in);
|
|
|
|
} catch (IOException ex) {
|
|
|
|
Logger.getLogger(ServerHandelClientsThread.class.getName()).log(Level.SEVERE, null, ex);
|
|
|
|
} finally {
|
|
|
|
pr.close();
|
|
|
|
}
|
2021-05-11 11:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public ServerHandelClientsThread(Socket socket, ClientMessageDistributorThread distributor) {
|
|
|
|
clientSocket = socket;
|
|
|
|
messageDistributor = distributor;
|
|
|
|
}
|
|
|
|
}
|