Documentation ¶
Index ¶
- func NewAuthSigMessage(key ed25519.PublicKey, sig []byte) *authSigMessage
- func Parallel(fns ...func())
- type SecureConnection
- func (sc *SecureConnection) Close() error
- func (sc *SecureConnection) LocalAddr() net.Addr
- func (sc *SecureConnection) Read(data []byte) (n int, err error)
- func (sc *SecureConnection) RemoteAddr() net.Addr
- func (sc *SecureConnection) RemotePubKey() ed25519.PublicKey
- func (sc *SecureConnection) SetDeadline(t time.Time) error
- func (sc *SecureConnection) SetReadDeadline(t time.Time) error
- func (sc *SecureConnection) SetWriteDeadline(t time.Time) error
- func (sc *SecureConnection) Write(data []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthSigMessage ¶
Types ¶
type SecureConnection ¶
type SecureConnection struct {
// contains filtered or unexported fields
}
Implements net.Conn
func NewSecureConnection ¶
func NewSecureConnection(conn io.ReadWriteCloser, locPrivKey ed25519.PrivateKey) (*SecureConnection, error)
Performs handshake and returns a new authenticated SecureConnection. Returns nil if error in handshake. Caller should call conn.Close()
func (*SecureConnection) LocalAddr ¶
func (sc *SecureConnection) LocalAddr() net.Addr
func (*SecureConnection) Read ¶
func (sc *SecureConnection) Read(data []byte) (n int, err error)
CONTRACT: data smaller than dataMaxSize is read atomically.
func (*SecureConnection) RemoteAddr ¶
func (sc *SecureConnection) RemoteAddr() net.Addr
func (*SecureConnection) RemotePubKey ¶
func (sc *SecureConnection) RemotePubKey() ed25519.PublicKey
Returns authenticated remote pubkey
func (*SecureConnection) SetDeadline ¶
func (sc *SecureConnection) SetDeadline(t time.Time) error
func (*SecureConnection) SetReadDeadline ¶
func (sc *SecureConnection) SetReadDeadline(t time.Time) error
func (*SecureConnection) SetWriteDeadline ¶
func (sc *SecureConnection) SetWriteDeadline(t time.Time) error
Click to show internal directories.
Click to hide internal directories.