|
-
Apr 16th, 2009, 02:13 PM
#1
Thread Starter
Addicted Member
Trailing Square Symbols Behind Message
Hi all ,
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
-
Apr 17th, 2009, 12:23 AM
#2
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
-
Apr 17th, 2009, 02:13 AM
#3
Thread Starter
Addicted Member
Re: Trailing Square Symbols Behind Message
-
Apr 17th, 2009, 02:16 AM
#4
Re: Trailing Square Symbols Behind Message
 Originally Posted by quddusaliquddus
thanks! that worked!
Of course it worked. You sound surprised.
-
Apr 22nd, 2009, 03:39 AM
#5
Re: Trailing Square Symbols Behind Message
 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
-
Apr 22nd, 2009, 04:47 AM
#6
Re: Trailing Square Symbols Behind Message
 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.
-
Apr 22nd, 2009, 07:40 AM
#7
Thread Starter
Addicted Member
Re: Trailing Square Symbols Behind Message
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|