Documentation ¶
Index ¶
- Constants
- func Read(conn net.Conn, delim byte) (string, error)
- func Write(conn net.Conn, content string) (int, error)
- type AsyncTcpListener
- type AsyncTcpSender
- func (self *AsyncTcpSender) Addr() net.Addr
- func (self *AsyncTcpSender) Close() bool
- func (self *AsyncTcpSender) Init(remoteAddr string, timeout time.Duration) error
- func (self *AsyncTcpSender) Receive(delim byte) <-chan TcpMessage
- func (self *AsyncTcpSender) RemoteAddr() net.Addr
- func (self *AsyncTcpSender) Send(content string) error
- type TcpListener
- type TcpMessage
- type TcpSender
Constants ¶
View Source
const (
DELIMITER = '\t'
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AsyncTcpListener ¶
type AsyncTcpListener struct {
// contains filtered or unexported fields
}
func (*AsyncTcpListener) Addr ¶
func (self *AsyncTcpListener) Addr() net.Addr
func (*AsyncTcpListener) Close ¶
func (self *AsyncTcpListener) Close() bool
func (*AsyncTcpListener) Init ¶
func (self *AsyncTcpListener) Init(addr string) error
type AsyncTcpSender ¶
type AsyncTcpSender struct {
// contains filtered or unexported fields
}
func (*AsyncTcpSender) Addr ¶
func (self *AsyncTcpSender) Addr() net.Addr
func (*AsyncTcpSender) Close ¶
func (self *AsyncTcpSender) Close() bool
func (*AsyncTcpSender) Init ¶
func (self *AsyncTcpSender) Init(remoteAddr string, timeout time.Duration) error
func (*AsyncTcpSender) Receive ¶
func (self *AsyncTcpSender) Receive(delim byte) <-chan TcpMessage
func (*AsyncTcpSender) RemoteAddr ¶
func (self *AsyncTcpSender) RemoteAddr() net.Addr
func (*AsyncTcpSender) Send ¶
func (self *AsyncTcpSender) Send(content string) error
type TcpListener ¶
type TcpListener interface { Init(addr string) error Listen(handler func(conn net.Conn)) error Close() bool Addr() net.Addr }
func NewTcpListener ¶
func NewTcpListener() TcpListener
type TcpMessage ¶
type TcpMessage struct {
// contains filtered or unexported fields
}
func NewTcpMessage ¶
func NewTcpMessage(content string, err error) TcpMessage
func (TcpMessage) Content ¶
func (self TcpMessage) Content() string
func (TcpMessage) Err ¶
func (self TcpMessage) Err() error
Click to show internal directories.
Click to hide internal directories.