Click to See Complete Forum and Search --> : Begin Connect


skuehner
March 15th, 2006, 03:06 PM
Hello,

I've written a client program and I'm using BeginConnect to wait for a connection.

In the BeginConnect-Callback I'm asking the socket with socket.Connected if it is connected. Sometimes it's not... why does my class enter into the BeginConnect callbakc although the socket isn't connected already?

wildfrog
March 18th, 2006, 09:55 PM
why does my class enter into the BeginConnect callbakc although the socket isn't connected already?Maybe your connection attempt failed? Maybe the remote host refused to accept the connection? Anyway, you should call EndConnect(...) to determine if you got connected or not.

- petter