C# Class BeardedManStudios.Network.DefaultServerTCP

Inheritance: TCPProcess
显示文件 Open project: drakelinglabs/unityarmada Class Usage Examples

Public Methods

Method Description
Connect ( string hostAddress, ushort port ) : void
DefaultServerTCP ( int maxConnections ) : System.Net.Sockets
Disconnect ( ) : void
Disconnect ( NetworkingPlayer player, string reason = "" ) : void
Send ( byte data, int length, object endpoint = null ) : void
TimeoutDisconnect ( ) : void
Write ( NetworkingPlayer player, NetworkingStream stream ) : void
Write ( NetworkingStream stream ) : void
WriteTo ( NetworkingPlayer player, NetworkingStream stream ) : void

Private Methods

Method Description
Listen ( object sender, DoWorkEventArgs e ) : void
ReadAsync ( object sender, DoWorkEventArgs e ) : void
ThreadedConnect ( object hostAndPort ) : void
WorkCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
WriteAndClose ( TcpClient targetSocket, NetworkingStream stream ) : void
listenWorker_ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

Method Details

Connect() public method

public Connect ( string hostAddress, ushort port ) : void
hostAddress string
port ushort
return void

DefaultServerTCP() public method

public DefaultServerTCP ( int maxConnections ) : System.Net.Sockets
maxConnections int
return System.Net.Sockets

Disconnect() public method

public Disconnect ( ) : void
return void

Disconnect() public method

public Disconnect ( NetworkingPlayer player, string reason = "" ) : void
player NetworkingPlayer
reason string
return void

Send() public method

public Send ( byte data, int length, object endpoint = null ) : void
data byte
length int
endpoint object
return void

TimeoutDisconnect() public method

public TimeoutDisconnect ( ) : void
return void

Write() public method

public Write ( NetworkingPlayer player, NetworkingStream stream ) : void
player NetworkingPlayer
stream NetworkingStream
return void

Write() public method

public Write ( NetworkingStream stream ) : void
stream NetworkingStream
return void

WriteTo() public method

public WriteTo ( NetworkingPlayer player, NetworkingStream stream ) : void
player NetworkingPlayer
stream NetworkingStream
return void