Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Dial(ctx *daze.Context, network string, address string) (io.ReadWriteCloser, error)
- func (c *Client) Estab(ctx *daze.Context, con io.ReadWriteCloser, network string, address string) (io.ReadWriteCloser, error)
- func (c *Client) Hello(con io.ReadWriteCloser) (io.ReadWriteCloser, error)
- type Server
- type TCPConn
- type UDPConn
Constants ¶
This section is empty.
Variables ¶
var Conf = struct { // The time error allowed by the server in seconds. LifeExpired int }{ LifeExpired: 120, }
Conf is acting as package level configuration.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client implemented the ashe protocol.
func NewClient ¶
NewClient returns a new Client. A secret data needs to be passed in Cipher, as a sign to interface with the Server.
func (*Client) Dial ¶
func (c *Client) Dial(ctx *daze.Context, network string, address string) (io.ReadWriteCloser, error)
Dial connects to the address on the named network.
func (*Client) Estab ¶ added in v1.18.1
func (c *Client) Estab(ctx *daze.Context, con io.ReadWriteCloser, network string, address string) (io.ReadWriteCloser, error)
Establish an existing connection. It is the caller's responsibility to close the con.
func (*Client) Hello ¶ added in v1.18.1
func (c *Client) Hello(con io.ReadWriteCloser) (io.ReadWriteCloser, error)
Hello creates an encrypted channel.
type Server ¶
Server implemented the ashe protocol. The ASHE server will typically evaluate the request based on source and destination addresses, and return one or more reply messages, as appropriate for the request type.
func (*Server) Hello ¶ added in v1.18.1
func (s *Server) Hello(con io.ReadWriteCloser) (io.ReadWriteCloser, error)
Hello creates an encrypted channel.
type TCPConn ¶
type TCPConn struct {
io.ReadWriteCloser
}
TCPConn is an implementation of the Conn interface for TCP network connections.
func NewTCPConn ¶ added in v1.15.8
func NewTCPConn(c io.ReadWriteCloser) *TCPConn
NewTCPConn returns a new TCPConn.
type UDPConn ¶
type UDPConn struct { io.ReadWriteCloser // contains filtered or unexported fields }
UDPConn is an implementation of the Conn interface for UDP network connections.
func NewUDPConn ¶ added in v1.15.8
func NewUDPConn(c io.ReadWriteCloser) *UDPConn
NewUDPConn returns a new UDPConn.