Versions in this module Expand all Collapse all v1 v1.1.2 Sep 16, 2021 Changes in this version + type ChannelDescriptor struct + ID byte + Priority int + RecvBufferCapacity int + RecvMessageCapacity int + SendQueueCapacity int + func (chDesc *ChannelDescriptor) FillDefaults() + type MConnConfig struct + RecvRate int64 + SendRate int64 + func DefaultMConnConfig() *MConnConfig + type MConnection struct + func NewMConnectionWithConfig(conn net.Conn, chDescs []*ChannelDescriptor, onReceive receiveCbFunc, ...) *MConnection + func (c *MConnection) CanSend(chID byte) bool + func (c *MConnection) OnStart() error + func (c *MConnection) OnStop() + func (c *MConnection) Send(chID byte, msg interface{}) bool + func (c *MConnection) String() string + func (c *MConnection) TrafficStatus() (*flowrate.Status, *flowrate.Status) + func (c *MConnection) TrySend(chID byte, msg interface{}) bool + type SecretConnection struct + func MakeSecretConnection(conn io.ReadWriteCloser, locPrivKey crypto.PrivKeyEd25519) (*SecretConnection, error) + func (sc *SecretConnection) Close() error + func (sc *SecretConnection) LocalAddr() net.Addr + func (sc *SecretConnection) Read(data []byte) (n int, err error) + func (sc *SecretConnection) RemoteAddr() net.Addr + func (sc *SecretConnection) RemotePubKey() crypto.PubKeyEd25519 + func (sc *SecretConnection) SetDeadline(t time.Time) error + func (sc *SecretConnection) SetReadDeadline(t time.Time) error + func (sc *SecretConnection) SetWriteDeadline(t time.Time) error + func (sc *SecretConnection) Write(data []byte) (n int, err error)