Link to home
Start Free TrialLog in
Avatar of emresamisuzer
emresamisuzer

asked on

System.Net.Sockets Read Unknown size of bytes

In an application I read data from the System.Net.Sockets.TCPClient buffer, but because I don't know the exact bytes to read I am having problems. The read function fires a timeout. Is there a way to read unknown bytes?
Dim bytes(tcpClient.ReceiveBufferSize) As Byte
networkStream.ReadTimeout = 20000
networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize))

Open in new window

SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial