I am getting say a persons name over a tcp connection. The problem is that when I do this :
The curName string has a length of 10025. How do I get rid of excess blank space in either the byte array I recieve the data in or the string after I convert it?
Code:
Dim buffSize As Integer
Dim inStream(10024) As Byte
buffSize = playerSockets(connectionCount).ReceiveBufferSize
playerStreams(connectionCount).Read(inStream, 0, buffSize)
Dim curName As String=System.Text.Encoding.ASCII.GetString (inStream)
Comment