TCP Socket Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • firebirds98
    New Member
    • Feb 2008
    • 15

    TCP Socket Question

    I am requesting data from a server using TCP Sockets and I do not receieve all the data unless I ask for the data two times. e.g.

    Code:
    Dim cpBytesRec As Int64 = sender2.Receive(bytes)
    dataFromCp = Encoding.ASCII.GetString(bytes, 0, cpBytesRec)
    cpBytesRec = sender2.Receive(bytes)
    dataFromCp += Encoding.ASCII.GetString(bytes, 0, cpBytesRec)
    Im trying to figure out why the first receieve will not get all of the data?
  • firebirds98
    New Member
    • Feb 2008
    • 15

    #2
    Solved: I had to increase the amount of bytes to read.

    Comment

    Working...