I'm using CC++ since 2-3 months now and it's really great :-). We (me and my team at university) try to build a client-server-system.
When I use TCPSession to build a new class (let's say "myClient", which inherits from TCPSession), for connecting to a server, I actually don't know how to reconnect to this server, when it was down. Sure it could be done by instantiating a new object - but I should do it within the original object. When I use the method "connect(...)" from TCPStream there just happens nothing :-/. Is this a known problem? Or is the fault on my side?
My code (from a method within "myClient") looks like this:
[...]
if (tcp()->eof()) {
this->connect(myHost, myPort, 512);
}
TIA, Spider
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm using CC++ since 2-3 months now and it's really great :-). We (me and my team at university) try to build a client-server-system.
When I use TCPSession to build a new class (let's say "myClient", which inherits from TCPSession), for connecting to a server, I actually don't know how to reconnect to this server, when it was down. Sure it could be done by instantiating a new object - but I should do it within the original object. When I use the method "connect(...)" from TCPStream there just happens nothing :-/. Is this a known problem? Or is the fault on my side?
My code (from a method within "myClient") looks like this:
[...]
if (tcp()->eof()) {
this->connect(myHost, myPort, 512);
}
TIA, Spider