C# Class TrotiNet.Test.TcpCommon

Common utility code for TCP and HTTP tests
Afficher le fichier Open project: Gizeta/Nekoxy-fiddler Class Usage Examples

Méthodes publiques

Méthode Description
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()

Method Details

DoMsgRoundTrip() public static méthode

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
Résultat void

ParseHttpHeaders() public static méthode

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
Résultat HttpHeaders

ParseHttpRequestLine() public static méthode

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
Résultat TrotiNet.HttpRequestLine

ParseHttpStatusLine() public static méthode

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
Résultat TrotiNet.HttpStatusLine

Setup() public static méthode

Set up a simple server that echoes everything it receives back to the sender
public static Setup ( bool UseIPv6 ) : void
UseIPv6 bool
Résultat void

TearDown() public static méthode

Stop the server started by Setup()
public static TearDown ( ) : void
Résultat void