473,761 Members | 4,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading a network stream from a Telnet site

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.

Mar 1 '07 #1
0 980

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
353
by: Ben Reese | last post by:
H I want to send text data via a TCPClient objects NetworkStream, that will be interpreted as color text in Telnet hosts Such as Telnet.exe or Putty Telnet for Example How do I format the byte info in the NetworkStream Buffer to do this Thank Ben
21
13096
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the server is on one line (\r\n at end) and is formed as - each of which is seperated by a space. Arguments with spaces in them are enclosed in quotations. So, I'm able to open a connection to the server. When I send a message to
3
2463
by: Alex Clark | last post by:
Hi All, I'm having some problems reading a network stream. I'm writing a lightweight POP client to handle a very specific task, but I keep unexpectedly reaching the end of the datastream when downloading a large-ish email (about 10K). This happens about 50% of the time when trying to download a large email from my POP server. I've tried telnet'ing into the POP server and manually issuing commands, and it works perfectly --- the...
2
1511
by: Ben Reese | last post by:
H I want to send text data via a TCPClient objects NetworkStream, that will be interpreted as color text in Telnet hosts Such as Telnet.exe or Putty Telnet for Example How do I format the byte info in the NetworkStream Buffer to do this Thank Ben
0
9538
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9353
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9975
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6623
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5241
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3889
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3481
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2765
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.