Documentation
¶
Index ¶
- type Client
- func (c *Client) DecodeCopy(src *net.TCPConn, dst *net.TCPConn) error
- func (c *Client) DecodeRead(con *net.TCPConn, bs []byte) (n int, err error)
- func (c *Client) EncodeCopy(src *net.TCPConn, dst *net.TCPConn) error
- func (c *Client) EncodeWrite(con *net.TCPConn, bs []byte) (int, error)
- func (c *Client) LoadConf(confPath string) error
- func (c *Client) Run() error
- type ClientConf
- type ClientConvertor
- type Server
- func (s *Server) DecodeCopy(src *net.TCPConn, dst *net.TCPConn) error
- func (s *Server) DecodeRead(con *net.TCPConn, bs []byte) (n int, err error)
- func (s *Server) EncodeCopy(src *net.TCPConn, dst *net.TCPConn) error
- func (s *Server) EncodeWrite(con *net.TCPConn, bs []byte) (int, error)
- func (s *Server) LoadConf(confPath string) error
- func (s *Server) Run() error
- type ServerConf
- type ServerConvertor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // 数据转换器 Converter convertor.Convertor // 本地服务地址 LocalAddr *net.TCPAddr `json:"local_addr"` // 服务器地址 ServerAddr *net.TCPAddr `json:"server_addr"` }
func (*Client) DecodeRead ¶
func (*Client) EncodeCopy ¶
EncodeCopy 从src中源源不断的读取原数据加密后写入到dst,直到src中没有数据可以再读取
type ClientConf ¶
type ClientConf struct { LocalAddr addr `toml:"local_addr"` // 本地服务地址 ServerAddr addr `toml:"server_addr"` // 服务器地址 Convertor ClientConvertor `toml:"convertor"` // 加密方式 }
type ClientConvertor ¶
type Server ¶
func (*Server) DecodeRead ¶
func (*Server) EncodeCopy ¶
从src中源源不断的读取原数据加密后写入到dst,直到src中没有数据可以再读取
type ServerConf ¶
type ServerConf struct { // 本地服务地址 LocalAddr addr `toml:"local_addr"` Convertor ServerConvertor `toml:"convertor"` }
type ServerConvertor ¶
Click to show internal directories.
Click to hide internal directories.