Documentation ¶
Overview ¶
Package smbtcp implements SMB 2 and 3 connections over TCP.
Index ¶
Constants ¶
const MaxLength = 16777215
MaxLength is the maximum message length when using direct TCP transport.
Variables ¶
var ErrBadHeader = errors.New("bad smb2 tcp header")
ErrBadHeader is returned when an invalid transport packet header is received from a connection.
Functions ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is an SMB connection over TCP.
func (Conn) Close ¶
Close closes the connection. Any blocked Receive or Send operations will be unblocked and return errors.
func (Conn) Receive ¶
Receive receives a message from the connection.
TODO: Support deadlines and/or cancellation.
func (Conn) RemoteAddr ¶
RemoteAddr returns the remote address of the connection.
type Header ¶
type Header []byte
Header interprets the bytes of a transport packet header for messages sent over TCP.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener listens for SMB connections over TCP.
func NewListener ¶
NewListener returns an SMB listener that listens on l. Messages will be allocated from pool.