C# Класс TrotiNet.Test.TcpCommon

Common utility code for TCP and HTTP tests
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DoMsgRoundTrip ( string msg_send, string msg_expect ) : void

Send a message through the TCP channel, and expect it to return unchanged

Useful for testing I/O levels 1 and 2. This method must be called between Setup() and TearDown().

ParseHttpHeaders ( string header ) : HttpHeaders

Parse a HTTP header after sending it through the TCP channel

This method must be called between Setup() and TearDown().

ParseHttpRequestLine ( string rq_line ) : HttpRequestLine

Parse a HTTP header after sending it through the TCP channel

This method must be called between Setup() and TearDown().

ParseHttpStatusLine ( string status_line ) : HttpStatusLine

Parse a HTTP status line after sending it through the TCP channel

This method must be called between Setup() and TearDown().

Setup ( bool UseIPv6 ) : void

Set up a simple server that echoes everything it receives back to the sender

TearDown ( ) : void

Stop the server started by Setup()

Описание методов

DoMsgRoundTrip() публичный статический Метод

Send a message through the TCP channel, and expect it to return unchanged
Useful for testing I/O levels 1 and 2. This method must be called between Setup() and TearDown().
public static DoMsgRoundTrip ( string msg_send, string msg_expect ) : void
msg_send string
msg_expect string
Результат void

ParseHttpHeaders() публичный статический Метод

Parse a HTTP header after sending it through the TCP channel
This method must be called between Setup() and TearDown().
public static ParseHttpHeaders ( string header ) : HttpHeaders
header string
Результат HttpHeaders

ParseHttpRequestLine() публичный статический Метод

Parse a HTTP header after sending it through the TCP channel
This method must be called between Setup() and TearDown().
public static ParseHttpRequestLine ( string rq_line ) : HttpRequestLine
rq_line string
Результат TrotiNet.HttpRequestLine

ParseHttpStatusLine() публичный статический Метод

Parse a HTTP status line after sending it through the TCP channel
This method must be called between Setup() and TearDown().
public static ParseHttpStatusLine ( string status_line ) : HttpStatusLine
status_line string
Результат TrotiNet.HttpStatusLine

Setup() публичный статический Метод

Set up a simple server that echoes everything it receives back to the sender
public static Setup ( bool UseIPv6 ) : void
UseIPv6 bool
Результат void

TearDown() публичный статический Метод

Stop the server started by Setup()
public static TearDown ( ) : void
Результат void