[gnet] Again: timeout in Conn objects



Hi all,

I have the problem that I have to test users whether they are firewalled
or not (whether I can connect to them or not). So I wanted to use the
Conn object with a timeout, but I dont understand this fully ... .

A little example to explain my question:


void callback(conn, somedata)
{
	do_anything;
}

1 void somefunc()
2 {
3 	myconn = gnet_conn_new_inetaddr(...., callbackfunc);
4 	gnet_conn_timeout(myconn, 3000);
5 	gnet_conn_connect(myconn);
6 	SO NOW WHAT HAPPENS IN THIS CODE LINE??
7 }


So The Things I Don't Understand are: 
	- is the next line executed? 
	- if yes: in what state is the conn object? 
	- if no: what do I do when I have to wait for the connection?? 


Help is - as always - very much appreciated and thankful accepted. ;-))
Especially as the problem I'm tracking with this is an old one and very,
very annoying for my work.


So thanks in advance and greetings, 

		Axel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]