[ace-users] ACE_NonBlocking_Connect_Handler examples?
nicolen at gmail.com
Tue May 19 04:35:04 CDT 2015
Has anyone managed to use ACE_NonBlocking_Connect_Handler successfully? I
have abandoned the combined Priority + Thread pool Reactor approqached (see
my previous post) in favour for this but it's very lacking in documentation
I have written a new ConnectHandler class that implements handle_input(),
handle_output() and handle_exception().
I can't manage to link my Connector SVC_Handler implementation with
ACE_Connector<TCPPort, ACE_SOCK_CONNECTOR> connectortcp;
ACE_NonBlocking_Connect_Handler<TCPPort> nbHandler =
ACE_NonBlocking_Connect_Handler<TCPPort>(connectortcp, this, 123);
int connFailure = connectortcp.connect(port, addr,
The connect() does return -1 and errno = EWOULDBLOCK as expected cos the
connect is done in a separate thread and the
ACE_NON_Blocking_Connect_Handler should be called by the Reactor.
I can see from TCP dump that it has managed to connect successfully but it
doesn't seem to do the connect in a separate thread and call the
handle_input() method of ACE_NonBlocking_Connect_Handler. Neither does it
attempt to retry connecting if I start the server after the first connect
attempt has failed.
The regular blocking connect (done in the same thread) that was implemented
before works correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ace-users