PowerTCP Telnet for .NETfrom $349.00
See all PowerTCP Telnet for .NET Code Examples
Receive and Display Data Example
The following example demonstrates receiving data and displaying it.
//Telnet.Read(buffer) performs a single socket read, blocking until at least one byte is read, up to as much data as is available on the socket or buffer.Length, whichever is lowest.
//This code will block until the connection is closed or Telnet.SocketOption.ReceiveTimeout has expired.
Telnet telnet1 = new Telnet();
telnet1.Login(new Credentials("myUsername", "myPassword", "$");
byte buffer = new byte;
Data data = telnet1.Read(buffer);
while (data != null)
data = telnet1.Read(buffer);
//handle exception as desired
To download a trial please visit the PowerTCP Telnet for .NET product page.