Documentation ¶
Index ¶
- Variables
- type Client
- type PingPong
- func (*PingPong) Descriptor() ([]byte, []int)
- func (m *PingPong) Marshal() (dAtA []byte, err error)
- func (m *PingPong) MarshalTo(dAtA []byte) (int, error)
- func (*PingPong) ProtoMessage()
- func (m *PingPong) Reset()
- func (m *PingPong) Size() (n int)
- func (m *PingPong) String() string
- func (m *PingPong) Unmarshal(dAtA []byte) error
- func (m *PingPong) XXX_DiscardUnknown()
- func (m *PingPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PingPong) XXX_Merge(src proto.Message)
- func (m *PingPong) XXX_Size() int
- func (m *PingPong) XXX_Unmarshal(b []byte) error
- type Server
- type TCPClient
- type TCPHello
- func (*TCPHello) Descriptor() ([]byte, []int)
- func (m *TCPHello) GetDomain() string
- func (m *TCPHello) GetKey() string
- func (m *TCPHello) GetPort() int64
- func (m *TCPHello) GetTCPDeadline() int64
- func (m *TCPHello) GetTCPTimeout() int64
- func (m *TCPHello) Marshal() (dAtA []byte, err error)
- func (m *TCPHello) MarshalTo(dAtA []byte) (int, error)
- func (*TCPHello) ProtoMessage()
- func (m *TCPHello) Reset()
- func (m *TCPHello) Size() (n int)
- func (m *TCPHello) String() string
- func (m *TCPHello) Unmarshal(dAtA []byte) error
- func (m *TCPHello) XXX_DiscardUnknown()
- func (m *TCPHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TCPHello) XXX_Merge(src proto.Message)
- func (m *TCPHello) XXX_Size() int
- func (m *TCPHello) XXX_Unmarshal(b []byte) error
- type TCPPacket
- func (*TCPPacket) Descriptor() ([]byte, []int)
- func (m *TCPPacket) GetAddress() string
- func (m *TCPPacket) GetData() []byte
- func (m *TCPPacket) Marshal() (dAtA []byte, err error)
- func (m *TCPPacket) MarshalTo(dAtA []byte) (int, error)
- func (*TCPPacket) ProtoMessage()
- func (m *TCPPacket) Reset()
- func (m *TCPPacket) Size() (n int)
- func (m *TCPPacket) String() string
- func (m *TCPPacket) Unmarshal(dAtA []byte) error
- func (m *TCPPacket) XXX_DiscardUnknown()
- func (m *TCPPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *TCPPacket) XXX_Merge(src proto.Message)
- func (m *TCPPacket) XXX_Size() int
- func (m *TCPPacket) XXX_Unmarshal(b []byte) error
- type TCPServer
- type UDPClient
- type UDPPacket
- func (*UDPPacket) Descriptor() ([]byte, []int)
- func (m *UDPPacket) GetAddress() string
- func (m *UDPPacket) GetData() []byte
- func (m *UDPPacket) GetKey() string
- func (m *UDPPacket) GetPort() int64
- func (m *UDPPacket) Marshal() (dAtA []byte, err error)
- func (m *UDPPacket) MarshalTo(dAtA []byte) (int, error)
- func (*UDPPacket) ProtoMessage()
- func (m *UDPPacket) Reset()
- func (m *UDPPacket) Size() (n int)
- func (m *UDPPacket) String() string
- func (m *UDPPacket) Unmarshal(dAtA []byte) error
- func (m *UDPPacket) XXX_DiscardUnknown()
- func (m *UDPPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UDPPacket) XXX_Merge(src proto.Message)
- func (m *UDPPacket) XXX_Size() int
- func (m *UDPPacket) XXX_Unmarshal(b []byte) error
- type UDPServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMr2 = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMr2 = fmt.Errorf("proto: integer overflow") )
View Source
var Dial x.Dialer = x.DefaultDial
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Server string ServerPort int64 ServerDomain string ClientServer string TCPDeadline int64 TCPTimeout int64 UDPDeadline int64 UDPConn *net.UDPConn Ckv *encrypt.KV TCPClient *TCPClient UDPClient *UDPClient }
Client .
type PingPong ¶
type PingPong struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PingPong) Descriptor ¶
func (*PingPong) ProtoMessage ¶
func (*PingPong) ProtoMessage()
func (*PingPong) XXX_DiscardUnknown ¶
func (m *PingPong) XXX_DiscardUnknown()
func (*PingPong) XXX_Marshal ¶
func (*PingPong) XXX_Unmarshal ¶
type Server ¶
type Server struct { TCPAddr *net.TCPAddr UDPAddr *net.UDPAddr TCPListen *net.TCPListener UDPConn *net.UDPConn Cache *cache.Cache Ckv *encrypt.KV PortCkv map[int64]*encrypt.KV }
Server .
type TCPClient ¶
type TCPClient struct { Client *Client TCPConn *net.TCPConn Cache *cache.Cache Done chan byte Data chan []byte Error chan error }
TCPClient .
type TCPHello ¶
type TCPHello struct { Port int64 `protobuf:"varint,1,opt,name=Port,proto3" json:"Port,omitempty"` TCPTimeout int64 `protobuf:"varint,2,opt,name=TCPTimeout,proto3" json:"TCPTimeout,omitempty"` TCPDeadline int64 `protobuf:"varint,3,opt,name=TCPDeadline,proto3" json:"TCPDeadline,omitempty"` Key string `protobuf:"bytes,4,opt,name=Key,proto3" json:"Key,omitempty"` Domain string `protobuf:"bytes,5,opt,name=Domain,proto3" json:"Domain,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TCPHello) Descriptor ¶
func (*TCPHello) GetTCPDeadline ¶
func (*TCPHello) GetTCPTimeout ¶
func (*TCPHello) ProtoMessage ¶
func (*TCPHello) ProtoMessage()
func (*TCPHello) XXX_DiscardUnknown ¶
func (m *TCPHello) XXX_DiscardUnknown()
func (*TCPHello) XXX_Marshal ¶
func (*TCPHello) XXX_Unmarshal ¶
type TCPPacket ¶
type TCPPacket struct { Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TCPPacket) Descriptor ¶
func (*TCPPacket) GetAddress ¶
func (*TCPPacket) ProtoMessage ¶
func (*TCPPacket) ProtoMessage()
func (*TCPPacket) XXX_DiscardUnknown ¶
func (m *TCPPacket) XXX_DiscardUnknown()
func (*TCPPacket) XXX_Marshal ¶
func (*TCPPacket) XXX_Unmarshal ¶
type TCPServer ¶
type TCPServer struct { Server *Server Cache *cache.Cache TCPConn *net.TCPConn TCPListen *net.TCPListener TCPTimeout int64 TCPDeadline int64 Done chan byte Data chan []byte Error chan error }
TCPServer .
func NewTCPServer ¶
NewTCPServer. Some cases return nil, nil
type UDPClient ¶
type UDPClient struct { Client *Client UDPConn *net.UDPConn Cache *cache.Cache Done chan byte Data chan []byte Error chan error }
UDPClient .
type UDPPacket ¶
type UDPPacket struct { Port int64 `protobuf:"varint,1,opt,name=Port,proto3" json:"Port,omitempty"` Address string `protobuf:"bytes,2,opt,name=Address,proto3" json:"Address,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` Key string `protobuf:"bytes,4,opt,name=Key,proto3" json:"Key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UDPPacket) Descriptor ¶
func (*UDPPacket) GetAddress ¶
func (*UDPPacket) ProtoMessage ¶
func (*UDPPacket) ProtoMessage()
func (*UDPPacket) XXX_DiscardUnknown ¶
func (m *UDPPacket) XXX_DiscardUnknown()
func (*UDPPacket) XXX_Marshal ¶
func (*UDPPacket) XXX_Unmarshal ¶
type UDPServer ¶
UDPServer .
func NewUDPServer ¶
NewUDPServer .
func (*UDPServer) HandlePacket ¶
HandlePacket sends data to consumer.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.