Documentation
¶
Overview ¶
Package socket provides socket client and server implementations.
Package socket provides socket client and server implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct that provides client related methods.
func (*Client) Connect ¶
Connect is connect to the address.
ex) err := client.Connect("tcp", "127.0.0.1:10000")
func (*Client) GetRemoteAddr ¶
GetRemoteAddr is get the remote Addr
ex) addr := client.GetRemoteAddr()
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a struct that provides server related methods.
func (*Server) GetCondition ¶
GetCondition is get the condition
ex) condition := server.GetCondition()
func (*Server) Start ¶
func (this *Server) Start(network, address string, clientPoolSize int, acceptSuccessFunc func(client Client), acceptFailureFunc func(err error)) error
Start is start the server.
ex) err := server.Start("tcp", "127.0.0.1:10000", 1024, func(client Client) {...}, func(err error) {...})
Click to show internal directories.
Click to hide internal directories.