Documentation
¶
Index ¶
- Constants
- func Middleware() func(http.Handler) http.Handler
- func NewCrypt(sessionkey []byte, salt []byte) crypt
- func WithConn(ctx context.Context, conn Conn) context.Context
- type Conn
- type Rendezvous
- func (r Rendezvous) ReadMsg(ctx context.Context, expected ...rendezvous.MsgType) (rendezvous.Msg, error)
- func (r Rendezvous) ReadRaw(ctx context.Context) ([]byte, error)
- func (r Rendezvous) WriteMsg(ctx context.Context, msg rendezvous.Msg) error
- func (r Rendezvous) WriteRaw(ctx context.Context, b []byte) error
- type Transfer
- func (tc Transfer) Key() []byte
- func (t Transfer) ReadMsg(ctx context.Context, expected ...transfer.MsgType) (transfer.Msg, error)
- func (t Transfer) ReadRaw(ctx context.Context) ([]byte, error)
- func (t Transfer) WriteMsg(ctx context.Context, msg transfer.Msg) error
- func (t Transfer) WriteRaw(ctx context.Context, b []byte) error
- type WS
Constants ¶
const MESSAGE_SIZE_LIMIT_BYTES = math.MaxInt64 - 1
impose no message size limit
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Rendezvous ¶
type Rendezvous struct {
Conn Conn
}
Rendezvous specifies a connection to the rendezvous server.
func (Rendezvous) ReadMsg ¶
func (r Rendezvous) ReadMsg(ctx context.Context, expected ...rendezvous.MsgType) (rendezvous.Msg, error)
ReadMsg reads a rendezvous message from the underlying connection.
func (Rendezvous) ReadRaw ¶ added in v1.1.0
func (r Rendezvous) ReadRaw(ctx context.Context) ([]byte, error)
ReadRaw reads raw bytes from the underlying connection.
func (Rendezvous) WriteMsg ¶
func (r Rendezvous) WriteMsg(ctx context.Context, msg rendezvous.Msg) error
WriteMsg writes a rendezvous message to the underlying connection.
type Transfer ¶
type Transfer struct { Conn Conn // contains filtered or unexported fields }
Transfer specifies a encrypted connection safe to transfer files over.
func TransferFromKey ¶
TransferFromKey returns a secure connection using the provided cryptographic key.
func TransferFromSession ¶
TransferFromSession returns a secure connection using the provided session key and salt.
func (Transfer) ReadMsg ¶
ReadMsg reads and decrypts the specified transfer message from the underlying connection.
func (Transfer) ReadRaw ¶ added in v1.1.0
ReadRaw reads and decrypts raw bytes from the underlying connection.