lightem90 / testMRMW

MRMW for deployment on test system
0 stars 0 forks source link

TODO: #3

Open lightem90 opened 9 years ago

lightem90 commented 9 years ago

Implement new handshake for new server connection (when a new server comes online it sends a message to all other addresses saying:"I'm reachable at this address".

lightem90 commented 9 years ago

from java docs of SocketChannel.connect:

If this channel is in non-blocking mode then an invocation of this method initiates a non-blocking connection operation. If the connection is established immediately, as can happen with a local connection, then this method returns true. Otherwise this method returns false and the connection operation must later be completed by invoking the finishConnect method.

If this channel is in blocking mode then an invocation of this method will block until the connection is established or an I/O error occurs.

This method performs exactly the same security checks as the Socket class. That is, if a security manager has been installed then this method verifies that its checkConnect method permits connecting to the address and port number of the given remote endpoint.

lightem90 commented 9 years ago

Done with "init" and "init_ack" messages. They update FD and reset comm with new channels and server count. Tested and working