|
-
May 16th, 2012, 12:34 AM
#1
Thread Starter
New Member
BinaryReader
hi all,
the following is my code that i am executing at the moment. i see "?" when i examine the value of wt. it reads "?" from the stream. do you have any reason why is it happening and also if i am missing something here.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim tcpipclient As New TcpClient
Dim stream As NetworkStream
Dim reader As BinaryReader
Dim wt As String = Nothing
tcpipclient.Connect("10.100.10.45", 1000)
stream = tcpipclient.GetStream
reader = New BinaryReader(stream)
wt = reader.ReadString
Console.Write(wt)
reader.Close()
stream.Close()
tcpipclient.Close()
wt = Nothing
End Sub
#######################################3
the output
?GS?+0000.56?t?
S?GS?+0000.56?t?
S?GS?+0000.56?t?
S?GS?+0000.56?t?
S?GS?+0000.
please also advise if there is any better code out there for me to try and use.
thanks in advance.....
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
|