C# Class FastNetwork.SocketConnector

连接器
Show file Open project: zhujunxxxxx/FastNetwork

Public Properties

Property Type Description
Name string

Public Methods

Method Description
BeginConnect ( EndPoint endPoint, IHost host, Action callback ) : void

begin connect

SocketConnector ( string name, EndPoint endPoint, IHost host, Action onConnected, Exception>.Action onDisconnected ) : System

new

Start ( ) : void

start

Stop ( ) : void

stop

Private Methods

Method Description
OnDisconnected ( IConnection connection, Exception ex ) : void

断开连接

Method Details

BeginConnect() public static method

begin connect
endPoint is null host is null callback is null
public static BeginConnect ( EndPoint endPoint, IHost host, Action callback ) : void
endPoint System.Net.EndPoint
host IHost
callback Action
return void

SocketConnector() public method

new
public SocketConnector ( string name, EndPoint endPoint, IHost host, Action onConnected, Exception>.Action onDisconnected ) : System
name string
endPoint System.Net.EndPoint
host IHost
onConnected Action
onDisconnected Exception>.Action
return System

Start() public method

start
public Start ( ) : void
return void

Stop() public method

stop
public Stop ( ) : void
return void

Property Details

Name public property

get node name
public string Name
return string