C# 클래스 TrotiNet.TcpServer

Implementation of a TCP/IP server
파일 보기 프로젝트 열기: Gizeta/Nekoxy-fiddler 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
ConnectedSockets HttpSocket>.Dictionary
LocalPort int

공개 메소드들

메소드 설명
Start ( OnNewClient onConnection ) : void

Spawn a thread that listens to incoming connections

Stop ( ) : void

Stop the listening threads and close the client sockets

TcpServer ( int localPort, bool bUseIPv6 ) : System

Initialize, but do not start, a multi-threaded TCP server listening for localhost connections only

보호된 메소드들

메소드 설명
AcceptCallback ( IAsyncResult ar ) : void

Callback method for accepting new connections

CheckSockets ( object eventState ) : void

Close broken sockets

This function is called regularly to clean up the list of connected sockets.

CloseSocket ( HttpSocket state ) : void

Remove the socket contained in the given state object from the connected array list and hash table, then close the socket

Pause ( ) : void
StartListening ( Socket &ListeningSocket ) : void

Open a listener socket and wait for connections

StartThread ( ) : void

메소드 상세

AcceptCallback() 보호된 메소드

Callback method for accepting new connections
protected AcceptCallback ( IAsyncResult ar ) : void
ar IAsyncResult
리턴 void

CheckSockets() 보호된 메소드

Close broken sockets
This function is called regularly to clean up the list of connected sockets.
protected CheckSockets ( object eventState ) : void
eventState object
리턴 void

CloseSocket() 보호된 메소드

Remove the socket contained in the given state object from the connected array list and hash table, then close the socket
protected CloseSocket ( HttpSocket state ) : void
state HttpSocket
리턴 void

Pause() 보호된 메소드

protected Pause ( ) : void
리턴 void

Start() 공개 메소드

Spawn a thread that listens to incoming connections
public Start ( OnNewClient onConnection ) : void
onConnection OnNewClient
리턴 void

StartListening() 보호된 메소드

Open a listener socket and wait for connections
protected StartListening ( Socket &ListeningSocket ) : void
ListeningSocket Socket
리턴 void

StartThread() 보호된 메소드

protected StartThread ( ) : void
리턴 void

Stop() 공개 메소드

Stop the listening threads and close the client sockets
public Stop ( ) : void
리턴 void

TcpServer() 공개 메소드

Initialize, but do not start, a multi-threaded TCP server listening for localhost connections only
public TcpServer ( int localPort, bool bUseIPv6 ) : System
localPort int TCP port to listen to
bUseIPv6 bool /// If true, listen on ::1 only. If false, listen on 127.0.0.1 only. ///
리턴 System

프로퍼티 상세

ConnectedSockets 보호되어 있는 프로퍼티

Set of open sockets, indexed by socket identifier
protected Dictionary ConnectedSockets
리턴 HttpSocket>.Dictionary

LocalPort 보호되어 있는 프로퍼티

Port used for local browser-proxy communication
protected int LocalPort
리턴 int