PeanutButter
Loading...
Searching...
No Matches
PeanutButter.SimpleHTTPServer.TcpClientExtensions Class Reference

Provides the ReadLine extension for a TcpClient. More...

Static Public Member Functions

static string ReadLine (this TcpClient client)
 Reads one line of data from the TcpClient with the default read timeout as specified byt TcpClientExtensions.DefaultReadTimeoutMs.
static string ReadLine (this TcpClient client, int readTimeout)
 Reads one line of data from the TcpClient.
static int TryReadByte (this NetworkStream stream)
 Attempt to read a byte from the NetworkStream. Any encountered exception makes this return -2.

Static Public Attributes

static int DefaultReadTimeoutMs = 3000
 The default read timeout when invoking ReadLine without any timeout value.

Detailed Description

Provides the ReadLine extension for a TcpClient.

Member Function Documentation

◆ ReadLine() [1/2]

string PeanutButter.SimpleHTTPServer.TcpClientExtensions.ReadLine ( this TcpClient client)
static

Reads one line of data from the TcpClient with the default read timeout as specified byt TcpClientExtensions.DefaultReadTimeoutMs.

Parameters
client
Returns

◆ ReadLine() [2/2]

string PeanutButter.SimpleHTTPServer.TcpClientExtensions.ReadLine ( this TcpClient client,
int readTimeout )
static

Reads one line of data from the TcpClient.

Parameters
client
readTimeout
Returns

◆ TryReadByte()

int PeanutButter.SimpleHTTPServer.TcpClientExtensions.TryReadByte ( this NetworkStream stream)
static

Attempt to read a byte from the NetworkStream. Any encountered exception makes this return -2.

Parameters
stream
Returns

The documentation for this class was generated from the following file:
  • source/SimpleServers/PeanutButter.SimpleHTTPServer/TcpClientExtensions.cs