473,770 Members | 6,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Color in a network stream buffer

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
Nov 22 '05 #1
2 1515
[Please fix your newsreader to wrap lines properly.]

=?Utf-8?B?QmVuIFJlZXN l?= <b_*******@hotm ail.com> wrote:
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?


You need to look into the telnet protocol and its various different
escape sequences for colours. Note that not all terminals will support
all of the different escape sequences - you'd usually use some
negotiation at the start of the session to work out what is supported.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2
[Please fix your newsreader to wrap lines properly.]

=?Utf-8?B?QmVuIFJlZXN l?= <b_*******@hotm ail.com> wrote:
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?


You need to look into the telnet protocol and its various different
escape sequences for colours. Note that not all terminals will support
all of the different escape sequences - you'd usually use some
negotiation at the start of the session to work out what is supported.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #3

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

Similar topics

6
7358
by: Yechezkal Gutfreund | last post by:
I have been using the following code (successfully) to read Xml formated text packets from a TCP stream. The output from the server stream consists of a sequence of well formed Xml documents written to the output stream. We are willing to pay $ to any expert (e.g. MVP) consultant who has to time to help us track down this problem. (we will discuss rates if you can prove your expertise, and problem solving approach).
0
3115
by: Thomas Zöchling | last post by:
Hat jemand (schlechte) Erfahrungen mit Asynchronen NetworkStreams gemacht? In meiner Serveranwendung scheint die BeginRead Methode des NetworkStreams manchnmal den Stream nicht fertig zu lesen. ... socket = socketForClient; buffer = new byte; networkStream = new NetworkStream(socketForClient); callbackRead = new AsyncCallback(this.OnReadComplete);
1
1795
by: Frosty Madness | last post by:
I have the beginnings of a device emulator that sits on the network... ************** using System; using System.Threading; using System.Net; using System.Net.Sockets; using System.Text;
3
2341
by: A.M-SG | last post by:
Hi, I have a ASP.NET aspx file that needs to pass large images from a network storage to client browser. The requirement is that users cannot have access to the network share. The aspx file must be the only method that users receive image files.
0
1826
by: Eddy_w | last post by:
Hello, I try to ping from my mobile device with a wireless connection to my pc. I found the class clsping on the internet and it works perfect with application from pc to pc but when i use it from mobile device (win ce.net 4.2) to pc then it doesn't work anymore. I get on error on the following statement: Dim sckSocket As New System.Net.Sockets.Socket( _
3
4030
by: kjell | last post by:
Hi, I'm trying to write a program that reads data from a network stream. I would like the program to read all available data in the buffer and then process the data. I do not want the program to hang unless there is no data in the buffer. For example if there are ten bytes available in the buffer I would like the program to read those ten bytes and then processed the data. If there are twenty bytes available in the buffer I would...
2
2764
by: White Spirit | last post by:
I have a function within an application where a client connected to a server continuously sends data. The code on the server side is of the following form: Socket socket = receiveSocket; NetworkStream networkStream = new NetworkStream (socket); System.IO.StreamReader streamReader = new System.IO.StreamReader (networkStream); while (socket.Connected)
3
6774
by: Sir Psycho | last post by:
Hi, For some reason, when i step over this code, it returns the full byte stream im expecting from the server, however when I let it run with no intervention, it only seems to grab a small chunk on the stream. What am I doing wrong? There is more code than this, but this is the problem code.
4
3959
by: aki | last post by:
Hi all, i am writing codes for implementing network protocols. i have written a method which is receiving a packet from network. i have assumed that the packet i will receive will be of type char*. i need to test my method and for that i want to create a network buffer which will contain a packet of format as-> example of Configuration req packet uint8_t code;
0
3585
by: george585 | last post by:
Hello! I am new to network programming, and understand just basics. Using some sample code, and having read documentation, I managed to create a simple app in C# and VB.NET. The application is supposed to do the following: monitor ALL INCOMING TCP traffic on the local computer, and save certain parts of it as files - not log files though, but actual files that are sent to the computer as part of http or ftp. Basically if a user browse a page...
0
9591
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
9425
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
10225
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
10053
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...
1
10001
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5312
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...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3969
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

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.