Re: Socket receive question



Hi,


Nope, you maust call Recieve while you get all data, as many times it needs.

Receive block only if no data available, till there is some data. But you
never be sure how many you will recieve, so you need to check SizeReceived.



"Ole" <ole@xxxxxxxxxx> wrote in message
news:e1TzUXbAHHA.4024@xxxxxxxxxxxxxxxxxxxxxxx
Hi

I'm receiving data from another device that sends data in packages of
8000. In my application I use this code to receive the data:
SizeReceived = MySocket.Receive(Buffer, 8000, SocketFlags.None);

But the receive-method sometimes returns after reading 4378 bytes?? Isn't
it so that the Socket.receive method should block until all the data is
received?

Thanks,
Ole



.



Relevant Pages

  • win32 problem with WM_COPYDATA
    ... I'm trying to make a python program that can recieve WM_COPYDATA ... but the application I'll be receiving them from ... def main: ...
    (comp.lang.python)
  • Re: How to receive DHCP issued routes (option 33)
    ... > routes as a DHCP client? ... > should just be receiving them? ... It should recieve them, and use them. ...
    (linux.redhat)
  • Re: how to recieve CC & CCO to my own email address
    ... check " Include this account when receiving mail..." ... I cant seem to recieve copies to myself although I fill in my own email address. ...
    (microsoft.public.windows.vista.mail)
  • Re: Outlook 2003 send/recieve problem
    ... them fine but will not recieve unless you do it manually or upon exit. ... > Yes, the same problem, but it's not receiving because mail is stuck. ... > afraid of losing my settings... ...
    (microsoft.public.outlook)
  • Problem in getting the content of email
    ... While receiving the messages I become disconnected, ... message when selecting that mail ... I tried several times by clicking send recieve, except that mail, every mail ... Danish Siddiqui ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)