ssl

package
v0.0.0-...-2e36be1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxMsg = 4096

MaxMsg limits the record size. Larger messages are truncated.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn represents one of these SSL connections.

func Client

func Client(fd net.Conn) *Conn

Client returns an SSL connection that applies SSL to the transport fd.

func (*Conn) Close

func (ssl *Conn) Close() error

Close closes the connection.

func (*Conn) LocalAddr

func (ssl *Conn) LocalAddr() net.Addr

LocalAddr returns the local network address, if known.

func (*Conn) Read

func (ssl *Conn) Read(buf []byte) (int, error)

Read reads data from the connection, following the net.Conn.Read conventions.

func (*Conn) RemoteAddr

func (ssl *Conn) RemoteAddr() net.Addr

RemoteAddr returns the remote network address, if known.

func (*Conn) SetDeadline

func (ssl *Conn) SetDeadline(t time.Time) error

SetDeadline sets the read and write deadlines associated with the connection. It is equivalent to calling both SetReadDeadline and SetWriteDeadline.

func (*Conn) SetReadDeadline

func (ssl *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline sets the deadline for future Read calls and any currently-blocked Read call. A zero value for t means Read will not time out.

func (*Conn) SetWriteDeadline

func (ssl *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline sets the deadline for future Write calls and any currently-blocked Write call. Even if write times out, it may return n > 0, indicating that some of the data was successfully written. A zero value for t means Write will not time out.

func (*Conn) StartCipher

func (ssl *Conn) StartCipher(inkey, outkey []byte) error

StartCipher engages digesting and encryption on the link, using 128-bit keys.

func (*Conn) Write

func (ssl *Conn) Write(buf []byte) (int, error)

Write writes data to the connection, following the net.Conn.Write conventions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL