tcp

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPTransport

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

TCPTransport implements the Transport interface for Direct TCP transport Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/f906c680-330c-43ae-9a71-f854e24aeee6

func NewTCPTransport

func NewTCPTransport() *TCPTransport

NewTCPTransport creates a new Direct TCP transport

func (*TCPTransport) Close

func (t *TCPTransport) Close() error

Close terminates the Direct TCP connection

func (*TCPTransport) Connect

func (t *TCPTransport) Connect(ipaddr net.IP, port int) error

Connect establishes a Direct TCP connection

func (*TCPTransport) IsConnected

func (t *TCPTransport) IsConnected() bool

IsConnected returns whether the Direct TCP transport is currently connected

func (*TCPTransport) Receive

func (t *TCPTransport) Receive() ([]byte, error)

Receive reads data from the Direct TCP connection, handling the Direct TCP header

func (*TCPTransport) Send

func (t *TCPTransport) Send(data []byte) (int, error)

Send transmits data over the Direct TCP connection with proper Direct TCP header

Jump to

Keyboard shortcuts

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