CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    49

    Receive data of Unkown Size

    I am using socket class for udp connection. I have to receive data from server but i do not know the size of data. In receive method we have to send byte array. Is there any way i can know how much bytes are available to read so that i can make an array of bytes for that size?
    Muhammad Waqas Badar

  2. #2
    Join Date
    May 2003
    Location
    Germany
    Posts
    936

    Re: Receive data of Unkown Size

    You can do it in a more simple way. Use the UdpClient class and you are done in a few minutes. Have a look at the MSDN help for an example.
    Useful or not? Rate my posting. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured