D
Donny
ok .. just wanted some help .. ( throw new YeahWeKnowException() !!)
after extensive 're-search' , i've found out that a ServerSocket is
supposed to go back to listening after starting a new Thread to handle
the returned Socket...
here's the problem-code:
ServerSocket serv_sock = new ServerSocket(80);
while(true) {
Socket temp = serv_sock.accept();
new ServiceManager(temp).start(); //code is blocking here!!
}
ServiceManager is a class that extends Thread.
what is happening is that code blocks at the area shown... the while
loop is not continued, until the socket that is passed to the
ServiceManager is closed...
the serv_sock doesn't go back to listening...
.... could anyone please throw some light on the matter..??
thanks in advance....
after extensive 're-search' , i've found out that a ServerSocket is
supposed to go back to listening after starting a new Thread to handle
the returned Socket...
here's the problem-code:
ServerSocket serv_sock = new ServerSocket(80);
while(true) {
Socket temp = serv_sock.accept();
new ServiceManager(temp).start(); //code is blocking here!!
}
ServiceManager is a class that extends Thread.
what is happening is that code blocks at the area shown... the while
loop is not continued, until the socket that is passed to the
ServiceManager is closed...
the serv_sock doesn't go back to listening...
.... could anyone please throw some light on the matter..??
thanks in advance....