Struct kcp::Kcp [] [src]

pub struct Kcp<Output: Write> { /* fields omitted */ }

KCP control

Methods

impl<Output: Write> Kcp<Output>
[src]

[src]

Creates a KCP control object, conv must be equal in both endpoints in one connection. output is the callback object for writing.

conv represents conversation.

[src]

Creates a KCP control object in stream mode, conv must be equal in both endpoints in one connection. output is the callback object for writing.

conv represents conversation.

[src]

Check buffer size without actually consuming it

[src]

Receive data from buffer

[src]

Send bytes into buffer

[src]

Get conv from the next input call

[src]

Check if Kcp is waiting for the next input

[src]

Set conv value

[src]

Get conv

[src]

Call this when you received a packet from raw connection

[src]

Flush pending ACKs

[src]

Flush pending data in buffer.

[src]

Update state every 10ms ~ 100ms.

Or you can ask check when to call this again.

[src]

Determine when you should call update. Return when you should invoke update in millisec, if there is no input/send calling. You can call update in that time without calling it repeatly.

[src]

Change MTU size, default is 1400

MTU = Maximum Transmission Unit

[src]

Get MTU

[src]

Set check interval

[src]

Set nodelay

fastest config: nodelay(true, 20, 2, true)

nodelay: default is disable (false) interval: internal update timer interval in millisec, default is 100ms resend: 0:disable fast resend(default), 1:enable fast resend nc: false: normal congestion control(default), true: disable congestion control

[src]

Set wndsize set maximum window size: sndwnd=32, rcvwnd=32 by default

[src]

snd_wnd Send window

[src]

rcv_wnd Receive window

[src]

Get waitsnd, how many packet is waiting to be sent

[src]

Set rx_minrto

[src]

Set fastresend

[src]

KCP header size

[src]

Enabled stream or not

[src]

Maximum Segment Size

[src]

Set maximum resend times

Check if KCP connection is dead (resend times excceeded)

Trait Implementations

impl<Output: Default + Write> Default for Kcp<Output>
[src]

[src]

Returns the "default value" for a type. Read more