|
-
Feb 22nd, 2007, 09:46 AM
#1
Thread Starter
New Member
Determining socket connection
The MSDN page for Socket.Connected gives code to show how to properly determine if the socket is connected at the current time, and not just as of the most recent operation, which contains the following code:
http://msdn2.microsoft.com/en-us/lib...connected.aspx
VB Code:
client.Blocking = False
client.Send(tmp, 0, 0)
Console.WriteLine("Connected!")
The above code sets blocking to false, which means you want execution to continue even though the requested operation is not complete. So, if execution continues after Socket.Send, then wouldn't the Console.WriteLine line ALWAYS write "Connected"?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|