Versions in this module Expand all Collapse all v0 v0.0.1 Feb 11, 2022 Changes in this version + const ProtoClose + const ProtoCodeFail + const ProtoCodeFull + const ProtoCodeOK + const ProtoConnnect + const ProtoData + var IcmpMsg_TYPE_name = map[int32]string + var IcmpMsg_TYPE_value = map[string]int32 + func HasProto(proto string) bool + func HasReliableProto(proto string) bool + func RegisterDialerController(fn func(network, address string, c syscall.RawConn) error) + func SupportProtos() []string + func SupportReliableProtos() []string + type Conn interface + Accept func() (Conn, error) + Dial func(dst string) (Conn, error) + Info func() string + Listen func(dst string) (Conn, error) + Name func() string + func NewConn(proto string) (Conn, error) + type HttpConfig struct + AcceptChanLen int + BufferSize int + CloseWaitTimeoutMs int + HBTimeoutMs int + MaxMsgIndex int + MaxPacketSize int + MaxRetryNum int + RecvChanLen int + RecvChanPushTimeout int + func DefaultHttpConfig() *HttpConfig + type IcmpMsg struct + Data []byte + Flag IcmpMsg_TYPE + Id string + Magic IcmpMsg_TYPE + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*IcmpMsg) Descriptor() ([]byte, []int) + func (*IcmpMsg) ProtoMessage() + func (m *IcmpMsg) GetData() []byte + func (m *IcmpMsg) GetFlag() IcmpMsg_TYPE + func (m *IcmpMsg) GetId() string + func (m *IcmpMsg) GetMagic() IcmpMsg_TYPE + func (m *IcmpMsg) Reset() + func (m *IcmpMsg) String() string + func (m *IcmpMsg) XXX_DiscardUnknown() + func (m *IcmpMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *IcmpMsg) XXX_Merge(src proto.Message) + func (m *IcmpMsg) XXX_Size() int + func (m *IcmpMsg) XXX_Unmarshal(b []byte) error + type IcmpMsg_TYPE int32 + const IcmpMsg_CLIENT_SEND_FLAG + const IcmpMsg_MAGIC + const IcmpMsg_PING_PROTO + const IcmpMsg_PONG_PROTO + const IcmpMsg_SERVER_SEND_FLAG + func (IcmpMsg_TYPE) EnumDescriptor() ([]byte, []int) + func (x IcmpMsg_TYPE) String() string + type KcpConn struct + func (c *KcpConn) Accept() (Conn, error) + func (c *KcpConn) Close() error + func (c *KcpConn) Dial(dst string) (Conn, error) + func (c *KcpConn) Info() string + func (c *KcpConn) Listen(dst string) (Conn, error) + func (c *KcpConn) Name() string + func (c *KcpConn) Read(p []byte) (n int, err error) + func (c *KcpConn) Write(p []byte) (n int, err error) + type QuicConn struct + func (c *QuicConn) Accept() (Conn, error) + func (c *QuicConn) Close() error + func (c *QuicConn) Dial(dst string) (Conn, error) + func (c *QuicConn) Info() string + func (c *QuicConn) Listen(dst string) (Conn, error) + func (c *QuicConn) Name() string + func (c *QuicConn) Read(p []byte) (n int, err error) + func (c *QuicConn) Write(p []byte) (n int, err error) + type RhttpConn struct + func (c *RhttpConn) Accept() (Conn, error) + func (c *RhttpConn) Close() error + func (c *RhttpConn) Dial(dst string) (Conn, error) + func (c *RhttpConn) GetConfig() *HttpConfig + func (c *RhttpConn) Info() string + func (c *RhttpConn) Listen(dst string) (Conn, error) + func (c *RhttpConn) Name() string + func (c *RhttpConn) Read(p []byte) (n int, err error) + func (c *RhttpConn) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (c *RhttpConn) SetConfig(config *HttpConfig) + func (c *RhttpConn) Write(p []byte) (n int, err error) + type RicmpConfig struct + AcceptChanLen int + BufferSize int + CloseTimeoutMs int + CloseWaitTimeoutMs int + Compress int + Congestion string + ConnectTimeoutMs int + CutSize int + MaxId int + MaxPacketSize int + MaxWin int + ResendTimems int + Stat int + func DefaultRicmpConfig() *RicmpConfig + type RicmpConn struct + func (c *RicmpConn) Accept() (Conn, error) + func (c *RicmpConn) Close() error + func (c *RicmpConn) Dial(dst string) (Conn, error) + func (c *RicmpConn) GetConfig() *RicmpConfig + func (c *RicmpConn) Info() string + func (c *RicmpConn) Listen(dst string) (Conn, error) + func (c *RicmpConn) Name() string + func (c *RicmpConn) Read(p []byte) (n int, err error) + func (c *RicmpConn) SetConfig(config *RicmpConfig) + func (c *RicmpConn) Write(p []byte) (n int, err error) + type RudpConfig struct + AcceptChanLen int + BufferSize int + CloseTimeoutMs int + CloseWaitTimeoutMs int + Compress int + Congestion string + ConnectTimeoutMs int + CutSize int + MaxId int + MaxPacketSize int + MaxWin int + ResendTimems int + Stat int + func DefaultRudpConfig() *RudpConfig + type RudpConn struct + func (c *RudpConn) Accept() (Conn, error) + func (c *RudpConn) Close() error + func (c *RudpConn) Dial(dst string) (Conn, error) + func (c *RudpConn) GetConfig() *RudpConfig + func (c *RudpConn) Info() string + func (c *RudpConn) Listen(dst string) (Conn, error) + func (c *RudpConn) Name() string + func (c *RudpConn) Read(p []byte) (n int, err error) + func (c *RudpConn) SetConfig(config *RudpConfig) + func (c *RudpConn) Write(p []byte) (n int, err error) + type TcpConn struct + func (c *TcpConn) Accept() (Conn, error) + func (c *TcpConn) Close() error + func (c *TcpConn) Dial(dst string) (Conn, error) + func (c *TcpConn) Info() string + func (c *TcpConn) Listen(dst string) (Conn, error) + func (c *TcpConn) Name() string + func (c *TcpConn) Read(p []byte) (n int, err error) + func (c *TcpConn) Write(p []byte) (n int, err error) + type UdpConfig struct + AcceptChanLen int + MaxPacketSize int + RecvChanLen int + RecvChanPushTimeout int + func DefaultUdpConfig() *UdpConfig + type UdpConn struct + func (c *UdpConn) Accept() (Conn, error) + func (c *UdpConn) Close() error + func (c *UdpConn) Dial(dst string) (Conn, error) + func (c *UdpConn) GetConfig() *UdpConfig + func (c *UdpConn) Info() string + func (c *UdpConn) Listen(dst string) (Conn, error) + func (c *UdpConn) Name() string + func (c *UdpConn) Read(p []byte) (n int, err error) + func (c *UdpConn) SetConfig(config *UdpConfig) + func (c *UdpConn) Write(p []byte) (n int, err error)