2
서버 코드는 어떻게 클라이언트를 추적 할 수 있습니까? 나는 이것을 이해할 수 없다 : 클라이언트 A와 클라이언트 B가 계속해서 서버에 요청을 보내는 경우, 클라이언트 A와 클라이언트 B 중 어느 것이 클라이언트 B인지 어떻게 알 수 있을까 ??Java 클라이언트 서버 프로그래밍
도와주세요.
내 서버 코드는 다음과 같습니다 -
while (true) {
try {
System.out.println("Connecting " + count++);
Socket client = acceptor.accept();
System.out.println("here 1");
logger.log(Level.INFO, "Client ["+client.getInetAddress() +"] tried to connect at "
+ new GregorianCalendar().getTime());
logger.log(Level.INFO,
"Connection received from " + client.getInetAddress()
+ ":" + client.getLocalPort());
processRequest(client);
}