C# 클래스 TrotiNet.Test.TcpCommon

Common utility code for TCP and HTTP tests
파일 보기 프로젝트 열기: Gizeta/Nekoxy-fiddler 1 사용 예제들

공개 메소드들

메소드 설명
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