Documentation ¶
Index ¶
- Constants
- func ConnToStream(c Conn) (net.Conn, error)
- func Listen(crypto *ServerCrypto, handler func(conn Conn)) func(w http.ResponseWriter, r *http.Request)
- type ClientCrypto
- type Conn
- type NetConn
- func (m *NetConn) Close() error
- func (m *NetConn) LocalAddr() net.Addr
- func (m *NetConn) Read(p []byte) (n int, err error)
- func (m *NetConn) RemoteAddr() net.Addr
- func (m *NetConn) SetDeadline(_ time.Time) error
- func (m *NetConn) SetReadDeadline(_ time.Time) error
- func (m *NetConn) SetWriteDeadline(_ time.Time) error
- func (m *NetConn) Write(p []byte) (n int, err error)
- type ServerCrypto
- type WSConn
Constants ¶
View Source
const ErrCloseChannel = errorString("panicked when closing channel")
View Source
const ErrCryptoNegociation = errorString("error in negociating crypto stream")
View Source
const ErrInvalidConfig = errorString("invalid crypto config")
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func Listen(crypto *ServerCrypto, handler func(conn Conn)) func(w http.ResponseWriter, r *http.Request)
Types ¶
type ClientCrypto ¶
func LoadClientCrypto ¶
func LoadClientCrypto(data []byte) (*ClientCrypto, error)
func (*ClientCrypto) Save ¶
func (c *ClientCrypto) Save() ([]byte, error)
type NetConn ¶
type NetConn struct {
// contains filtered or unexported fields
}
func (*NetConn) RemoteAddr ¶
type ServerCrypto ¶
func LoadServerCrypto ¶
func LoadServerCrypto(data []byte) (*ServerCrypto, error)
func NewServerCrypto ¶
func NewServerCrypto() (*ServerCrypto, error)
func (*ServerCrypto) Save ¶
func (c *ServerCrypto) Save() ([]byte, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.