Documentation ¶
Overview ¶
Package transfer defines how server and client connect to each other
Index ¶
Constants ¶
View Source
const ( EVENT_CLIENT_CONNECTED = "EVENT_CLIENT_CONNECTED" EVENT_CLIENT_DISCONNECTED = "EVENT_CLIENT_DISCONNECTED" EVENT_CLIENT_SENT = "EVENT_CLIENT_SENT" EVENT_CLIENT_RECVED = "EVENT_CLIENT_RECVED" EVENT_SERVER_STARTED = "EVENT_SERVER_STARTED" EVENT_SERVER_ERROR = "EVENT_SERVER_ERROR" EVENT_SERVER_BEFORE_STOP = "EVENT_SERVER_BEFORE_STOP" EVENT_SERVER_STOPPED = "EVENT_SERVER_STOPPED" EVENT_SERVER_NEW_CLIENT = "EVENT_SERVER_NEW_CLIENT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IClient ¶
type IClient interface { event.IEvent IHeaderCreator RegistDelegate(delegate IClientDelegate) UnregistDelegate(delegate IClientDelegate) LocalAddr() Addr RemoteAddr() Addr Id() uint32 IsConnected() bool Connect(host string, port int) error Disconnect() error Read(buf []byte) (int, error) Write(buf []byte) (int, error) Send(*pkg.Header, []byte) error Recv() (*pkg.Header, []byte, error) }
type IClientDelegate ¶
type IHeaderCreator ¶
type IServerDelegate ¶
Directories ¶
Path | Synopsis |
---|---|
Package base provide common logic to transfer
|
Package base provide common logic to transfer |
Package tcp is a tcp implement to transfer
|
Package tcp is a tcp implement to transfer |
Package websocket is a websocket implement to transfer
|
Package websocket is a websocket implement to transfer |
Package websocket is a websocket implement to transfer
|
Package websocket is a websocket implement to transfer |
Click to show internal directories.
Click to hide internal directories.