Re: [twsocket] Connected when not connected

2011-05-03 Thread Wilfried Mestdagh
Hi, This is how winsock works. OnSessionConnected is fired with an error, after it OnSessionClosed is fired with or without an error. You should use the events in how to access the component. -- mvg, Wilfried http://www.mestdagh.biz http://www.comfortsoftware.be http://www.expertsoftware.be

Re: [twsocket] Connected when not connected

2011-05-03 Thread Piotr Dałek
Hello! Hi, This is how winsock works. OnSessionConnected is fired with an error, after it OnSessionClosed is fired with or without an error. So having TWSocket's state different from actual state should be considered normal? If so, then I understand that checking for component state is NOT

Re: [twsocket] Connected when not connected

2011-05-03 Thread Francois PIETTE
This is how winsock works. OnSessionConnected is fired with an error, after it OnSessionClosed is fired with or without an error. So having TWSocket's state different from actual state should be considered normal? If so, then I understand that checking for component state is NOT enough to

Re: [twsocket] Connected when not connected

2011-05-03 Thread Piotr Dałek
Hello! This is how winsock works. OnSessionConnected is fired with an error, after it OnSessionClosed is fired with or without an error. So having TWSocket's state different from actual state should be considered normal? If so, then I understand that checking for component state is NOT

Re: [twsocket] Connected when not connected

2011-05-03 Thread Francois PIETTE
So how should I handle connection errors in a way that makes user aware of error AND not cause any kind of disaster? Catch the error code in OnSessionConnected Yes, indeed. and (using some kind of PostMessage) display actual error message outside OnSessionConnected? If you like it so, no