Documentation ¶
Index ¶
- Constants
- func Listen(hostPort string, cfg *config.Config, handler func(wire *SecureWire)) error
- type PayLoadSize
- type SecureWire
- func BuildSecureWire(keysBytes []byte, conn net.Conn, localKeyId, remoteKeyId [32]byte) (wire *SecureWire, err error)
- func ClientHandshake(conn net.Conn, cfg *config.Config) (wire *SecureWire, err error)
- func NewSecureWireAES256CGM(key []byte, nonce []byte, conn net.Conn, localKeyId, remoteKeyId [32]byte) (sw *SecureWire, err error)
- func ServerHandshake(conn net.Conn, cfg *config.Config) (wire *SecureWire, err error)
- func (s *SecureWire) Close() error
- func (s *SecureWire) LocalAddr() net.Addr
- func (s *SecureWire) LocalKeyId() [32]byte
- func (s *SecureWire) Read(b []byte) (n int, err error)
- func (s *SecureWire) RemoteAddr() net.Addr
- func (s *SecureWire) RemoteKeyId() [32]byte
- func (s *SecureWire) SetDeadline(t time.Time) error
- func (s *SecureWire) SetReadDeadline(t time.Time) error
- func (s *SecureWire) SetWriteDeadline(t time.Time) error
- func (s *SecureWire) Write(b []byte) (n int, err error)
- type ServerError
Constants ¶
View Source
const MaxPuzzleClientWouldAccept = 20
View Source
const NetworkBufferSize = 65 * 1024
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PayLoadSize ¶
type PayLoadSize struct {
Size uint32
}
type SecureWire ¶
type SecureWire struct {
// contains filtered or unexported fields
}
func BuildSecureWire ¶
func ClientHandshake ¶
func NewSecureWireAES256CGM ¶
func ServerHandshake ¶
func (*SecureWire) Close ¶
func (s *SecureWire) Close() error
func (*SecureWire) LocalAddr ¶
func (s *SecureWire) LocalAddr() net.Addr
func (*SecureWire) LocalKeyId ¶
func (s *SecureWire) LocalKeyId() [32]byte
func (*SecureWire) RemoteAddr ¶
func (s *SecureWire) RemoteAddr() net.Addr
func (*SecureWire) RemoteKeyId ¶
func (s *SecureWire) RemoteKeyId() [32]byte
func (*SecureWire) SetDeadline ¶
func (s *SecureWire) SetDeadline(t time.Time) error
func (*SecureWire) SetReadDeadline ¶
func (s *SecureWire) SetReadDeadline(t time.Time) error
func (*SecureWire) SetWriteDeadline ¶
func (s *SecureWire) SetWriteDeadline(t time.Time) error
type ServerError ¶
type ServerError struct {
// contains filtered or unexported fields
}
func Disconnect ¶
func Disconnect(err error, cause uint32) *ServerError
func ServerErrorWrap ¶
func ServerErrorWrap(err error) *ServerError
Click to show internal directories.
Click to hide internal directories.