By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,467 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,467 IT Pros & Developers. It's quick & easy.

TCP sockets IOCONTROL in .net2.0?

P: n/a
Hey guys

I recently saw that in .net 2.0 there is a new IOCONTROL you can use.

One of the features it has is a DataToRead and a OOBDataToRead.

I am presently having problems it seems in knowing when i have received all
my data over my socket and this looks on the surface as the answer to my
prayers. Only problem is it returns weird results.

Using DataToRead i got 5012 yet i only sent 2000 or so bytes.

Using OOBDataToRead i got a 1 no matter what i did

And Socket.Available gave me the 5012 as well.

I do this in my code:

bytesRead = theSockId.thisSocket.EndReceive (asyn); //end receive on socket
passed in and return totalbytes

To finish the receive where theSockId is a class i made that holds a socket
and a buffer. Can someone please give me a simple example of using this
IOCONTROL on a socket so that i shows sending and receiving data accurately?
Thanks. Alink to a good tutorial would help also as i can't find any. MSDN
only shows a basic example which only covers how to get the data from the
available property.

Mar 30 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.