Documentation
¶
Overview ¶
Package curvecp implements a CurveCP-esque protocol over stateful reliable ordered bidirectional point-to-point datagram streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = fmt.Errorf("connection is closed")
Functions ¶
Types ¶
type Config ¶
type Config struct {
IsServer bool
Curvek [32]byte // own private key
CurveK *[32]byte // optional public key (optimization; avoids need for Curve25519 operation)
CurveS [32]byte // server's public key (required only if we are a client)
Rand io.Reader // if nil, crypto/rand is used
// Used only by Dial. If nil, denet.DefaultDialer is used.
Dialer denet.Dialer
}
Initiation parameters for CurveCP session.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
CurveCP connection.
func Dial ¶
Utility function to dial an address and create a connection on it.
net should almost certainly be "tcp". You must set Curvek and CurveS.
func New ¶
Initiate a CurveCP connection over a reliable ordered bidirectional point-to-point datagram stream.
func (*Conn) PeerPublicKey ¶
Returns the peer's permanent public key.
func (*Conn) PeerTemporaryPublicKey ¶
Returns the peer's transient public key. Rarely needed.
Click to show internal directories.
Click to hide internal directories.