Can I close ServerSocket after
Can i close the ServerSocket after it has accepted a connection and still be able to use that socket that the ServerSocket.accept() returned. heres the code for that to make a little more sense
ServerSocket PersonalSocket =new ServerSocket(ports);
ConnectList[ports - 7000] = PersonalSocket.accept();
PersonalSocket.close();
ConnectList is an array of Sockets
SO my question is will ConnectList work once PersonalSocket has been closed?
Thx for any help
[530 byte] By [
Staxoa] at [2007-10-3 2:21:19]

> ServerSocket PersonalSocket = new
> ServerSocket(ports);
> ConnectList[ports - 7000] = PersonalSocket.accept();
> PersonalSocket.close();
>
> ConnectList is an array of Sockets
> SO my question is will ConnectList work once
> PersonalSocket has been closed?
ConnectList[] won't work at all, but not because of closing the ServerSocket. If you put all accepted sockets into the same place you are going to lose all but the last one.
ejpa at 2007-7-14 19:20:15 >
