C# Class FastNetwork.ConnectionCollection

socket connection collection
Mostrar archivo Open project: zhujunxxxxx/FastNetwork

Public Methods

Method Description
Add ( IConnection connection ) : bool

add

Count ( ) : int

count.

DisconnectAll ( ) : void

断开所有连接

Get ( long connectionID ) : IConnection

get by connection id

Remove ( long connectionID ) : bool

remove connection by id.

ToArray ( ) : IConnection[]

to array

Method Details

Add() public method

add
connection is null
public Add ( IConnection connection ) : bool
connection IConnection
return bool

Count() public method

count.
public Count ( ) : int
return int

DisconnectAll() public method

断开所有连接
public DisconnectAll ( ) : void
return void

Get() public method

get by connection id
public Get ( long connectionID ) : IConnection
connectionID long
return IConnection

Remove() public method

remove connection by id.
public Remove ( long connectionID ) : bool
connectionID long
return bool

ToArray() public method

to array
public ToArray ( ) : IConnection[]
return IConnection[]