Documentation
¶
Index ¶
Constants ¶
View Source
const ( FragmentHeaderSize uint8 = 5 ReassemblyBufSize uint16 = 512 )
View Source
const ( RegularPacketPrefix byte = iota FragmentPacketPrefix )
View Source
const ( // heartbeat options DefaulthbPeriod = 20 * time.Millisecond DefaultHearbeatDeadline = 1000 * time.Millisecond DefaultMaxHearbeatReceivers uint16 = 32 // fragment options DefaultFragmentSize uint32 = 4096 DefaultMaxFragments uint8 = 64 )
Variables ¶
View Source
var HeartbeatMsg = []byte(".h")
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func NewEndpoint(conn net.PacketConn, rh receiveHandler, eh errorHandler, opts []Option, reOpts ...reliable.EndpointOption) (*Endpoint, error)
Note: about reOpts, reliable.WithEndpointPacketHandler is overwritten
func (*Endpoint) ReadPacket ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithFragmentSize ¶
func WithHearbeatTimeout ¶
func WithMaxFragments ¶
func WithhbPeriod ¶
Click to show internal directories.
Click to hide internal directories.