Trailing Square Symbols Behind Message
Hi all :D,
I have run the following program (es explained at the link):
http://www.vbforums.com/showthread.p...45#post3495845
Now I get the message text in the chat window but with trailing square characters after it.
Can someone help me remove these please?
Thanks
Q
Re: Trailing Square Symbols Behind Message
Code:
Private Sub getMessage()
For infiniteCounter = 1 To 2
infiniteCounter = 1
serverStream = clientSocket.GetStream()
Dim buffSize As Integer
Dim inStream(10024) As Byte
buffSize = clientSocket.ReceiveBufferSize
Dim dataLength As Integer = serverStream.Read(inStream, 0, buffSize)
Dim returndata As String = _
System.Text.Encoding.ASCII.GetString(inStream, 0, dataLength)
readData = "" + returndata
msg()
Next
End Sub
Re: Trailing Square Symbols Behind Message
Re: Trailing Square Symbols Behind Message
Quote:
Originally Posted by
quddusaliquddus
thanks! that worked!
Of course it worked. You sound surprised. ;)
Re: Trailing Square Symbols Behind Message
Quote:
Originally Posted by
jmcilhinney
Code:
Private Sub getMessage()
For infiniteCounter = 1 To 2
infiniteCounter = 1
serverStream = clientSocket.GetStream()
Dim buffSize As Integer
Dim inStream(10024) As Byte
buffSize = clientSocket.ReceiveBufferSize
Dim dataLength As Integer = serverStream.Read(inStream, 0, buffSize)
Dim returndata As String = _
System.Text.Encoding.ASCII.GetString(inStream, 0, dataLength)
readData = "" + returndata
msg()
Next
End Sub
WOW that is one of the most weird infinite loops I have ever seen
Re: Trailing Square Symbols Behind Message
Quote:
Originally Posted by
Lightning
WOW that is one of the most weird infinite loops I have ever seen
"weird" isn't the half of it. I just want to point out that that code wasn't mine. I was just modifying the code that the OP got from another source. That loop is downright shameful.
Re: Trailing Square Symbols Behind Message