Skip to content

kcp2k::KcpServer

Public Functions

Name
KcpServer(Action< int > OnConnected, Action< int, ArraySegment< byte >> OnData, Action< int > OnDisconnected, bool NoDelay, uint Interval, int FastResend =0, bool CongestionWindow =true, uint SendWindowSize =Kcp.WND_SND, uint ReceiveWindowSize =Kcp.WND_RCV)
bool IsActive()
void Start(ushort port)
void Send(int connectionId, ArraySegment< byte > segment)
void Disconnect(int connectionId)
string GetClientAddress(int connectionId)
void Tick()
void Stop()

Public Attributes

Name
Action< int > OnConnected
Action< int, ArraySegment< byte > > OnData
Action< int > OnDisconnected
bool NoDelay
uint Interval
int FastResend
bool CongestionWindow
uint SendWindowSize
uint ReceiveWindowSize
Dictionary< int, KcpServerConnection > connections

Public Functions Documentation

function KcpServer

inline KcpServer(
    Action< int > OnConnected,
    Action< int, ArraySegment< byte >> OnData,
    Action< int > OnDisconnected,
    bool NoDelay,
    uint Interval,
    int FastResend =0,
    bool CongestionWindow =true,
    uint SendWindowSize =Kcp.WND_SND,
    uint ReceiveWindowSize =Kcp.WND_RCV
)

function IsActive

bool IsActive()

function Start

inline void Start(
    ushort port
)

function Send

inline void Send(
    int connectionId,
    ArraySegment< byte > segment
)

function Disconnect

inline void Disconnect(
    int connectionId
)

function GetClientAddress

inline string GetClientAddress(
    int connectionId
)

function Tick

inline void Tick()

function Stop

inline void Stop()

Public Attributes Documentation

variable OnConnected

Action< int > OnConnected;

variable OnData

Action< int, ArraySegment< byte > > OnData;

variable OnDisconnected

Action< int > OnDisconnected;

variable NoDelay

bool NoDelay;

variable Interval

uint Interval;

variable FastResend

int FastResend;

variable CongestionWindow

bool CongestionWindow;

variable SendWindowSize

uint SendWindowSize;

variable ReceiveWindowSize

uint ReceiveWindowSize;

variable connections

Dictionary< int, KcpServerConnection > connections = new Dictionary<int, [KcpServerConnection](/Documentation/Cops%20And%20Robbers/Classes/classkcp2k_1_1KcpServerConnection/)>();

Updated on 21 January 2021 at 10:00:11 UTC