| Author |
NIO Socket - connection problem
|
biju thomas
Greenhorn
Joined: Jun 21, 2002
Posts: 1
|
|
Hi, I am using the new NIO (of Java 1.4) for making a socket connection to a server. I do the following: * Create a Selector (selector) * Open a SocketChannel (sc) * Connect to the Server using sc.connect() * and if it returns false I register it with the selector for OP_CONNECT * and when I recieve the CONNECT message, I use the sc.finishConnect() This works fine, when the Server is running. But if the server is started after starting the client program, the program never recieves the OP_CONNECT message. Does anyone know how to work arround this problem ? Thanks, biju.
|
 |
 |
|
|
subject: NIO Socket - connection problem
|
|
|