Hi,
I'm having a weird problem... Part of code first:
Dim bytes(tcpClient .ReceiveBufferS ize) As Byte
Dim DataChunk as String
Dim FullData as String
Do While EOF = False
If networkStream.D ataAvailable = True Then
networkStream.R ead(bytes, 0, CInt(tcpClient. ReceiveBufferSi ze))
DataChunk = Encoding.ASCII. GetString(bytes )
DataChunk = Trim(DataChunk)
FullData = FullData & DataChunk
bytes.Clear(byt es, 0, CInt(tcpClient. ReceiveBufferSi ze))
If DataChunk="EOF, AppConfirmation String"
EOF = True
End If
End If
Loop
When a number of packets is received on the socket (e.g. client sending
data line by line rather than a single stream), FullData always equals
to whatever the first packet (line) included. It just doesn't seem to
add DataChunk to itself each time loop is run. Why?
When instead of this I try adding DataChunk to a textbox, it's fine, at
the end I have all data sent to me in textbox...
--
Greets,
Arkadiusz 'Winger' Slusarczyk
Republic of Ireland
I'm having a weird problem... Part of code first:
Dim bytes(tcpClient .ReceiveBufferS ize) As Byte
Dim DataChunk as String
Dim FullData as String
Do While EOF = False
If networkStream.D ataAvailable = True Then
networkStream.R ead(bytes, 0, CInt(tcpClient. ReceiveBufferSi ze))
DataChunk = Encoding.ASCII. GetString(bytes )
DataChunk = Trim(DataChunk)
FullData = FullData & DataChunk
bytes.Clear(byt es, 0, CInt(tcpClient. ReceiveBufferSi ze))
If DataChunk="EOF, AppConfirmation String"
EOF = True
End If
End If
Loop
When a number of packets is received on the socket (e.g. client sending
data line by line rather than a single stream), FullData always equals
to whatever the first packet (line) included. It just doesn't seem to
add DataChunk to itself each time loop is run. Why?
When instead of this I try adding DataChunk to a textbox, it's fine, at
the end I have all data sent to me in textbox...
--
Greets,
Arkadiusz 'Winger' Slusarczyk
Republic of Ireland
Comment