I am trying to read text from a Telnet site melvyl.ucop.edu . I run the
following VB .NET 2003 code:
Dim nstc As New Net.Sockets.Tcp Client("melvyl. ucop.edu", 23)
Dim nsns As Net.Sockets.Net workStream = nstc.GetStream( )
If nsns.DataAvaila ble Then
Dim ab(nstc.Receive BufferSize) As Byte
nsns.Read(ab, 0, CInt(nstc.Recei veBufferSize))
Dim s As String = System.Text.Enc oding.ASCII.Get String(ab)
End If
But string s ends up as garbage characters. Is it something to do with my
encoding? This Telnet site is operational through the command line telnet
application.