Skip to content

kcp2k::KcpClient

Public Functions

Name
KcpClient(Action OnConnected, Action< ArraySegment< byte >> OnData, Action OnDisconnected)
void Connect(string address, ushort port, bool noDelay, uint interval, int fastResend =0, bool congestionWindow =true, uint sendWindowSize =Kcp.WND_SND, uint receiveWindowSize =Kcp.WND_RCV)
void Send(ArraySegment< byte > segment)
void Disconnect()
void Tick()

Public Attributes

Name
Action OnConnected
Action< ArraySegment< byte > > OnData
Action OnDisconnected
KcpClientConnection connection
bool connected

Public Functions Documentation

function KcpClient

inline KcpClient(
    Action OnConnected,
    Action< ArraySegment< byte >> OnData,
    Action OnDisconnected
)

function Connect

inline void Connect(
    string address,
    ushort port,
    bool noDelay,
    uint interval,
    int fastResend =0,
    bool congestionWindow =true,
    uint sendWindowSize =Kcp.WND_SND,
    uint receiveWindowSize =Kcp.WND_RCV
)

function Send

inline void Send(
    ArraySegment< byte > segment
)

function Disconnect

inline void Disconnect()

function Tick

inline void Tick()

Public Attributes Documentation

variable OnConnected

Action OnConnected;

variable OnData

Action< ArraySegment< byte > > OnData;

variable OnDisconnected

Action OnDisconnected;

variable connection

KcpClientConnection connection;

variable connected

bool connected;

Updated on 24 January 2021 at 23:47:12 UTC