Is this because there's no data available yet, so a Receive call would
block? What happens if you put data in there?
I have no control over the server end, so I can't simulate this (it's run by
a B2B business partner, and made available to clients "as is"). However, I
suspect that you are right and I am now writing a timer to check every 5
seconds.
Out of interest, do you have a reason for polling instead of using the
asynchronous calls?
I'm new to sockets programming and the synchronous methods are easier to
implement (although more primitive). As I have no control over the server,
I need a quick method to see if I can establish communication and receive
data. Once that's accomplished, I will implement asynch methods.
BTW, this will establish continuous streams. I wonder if asynchronous
methods are appropriate for that. I am translating from a set of C++
programs, wherein the client polls once a second. Any thoughts?
"JDavis" <da***@spamfree.comwrote in message
news:wu******************************@giganews.com ...
>I have created a static class-level socket for use by the class member
functions:
static Socket s = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
The Connect and Disconnect methods work fine, as does the synchronous Send
method. However, the Poll method returns true for SelectMode.SelectWrite
and false for SelectMode.SelectRead. Therefore, synchronous Read won't
return anything.
Based on this information, can anyone explain why this new socket would be
writable but not readable?
Thanks for any information.