tcp

package
v0.0.0-...-11c6e6d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(remote uint16, dstIP *ipv4.Address) (*Client, error)

func (*Client) Connect

func (c *Client) Connect() (*TCB, error)

type Server

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

func NewServer

func NewServer() (*Server, error)

func (*Server) Accept

func (s *Server) Accept() (c *TCB, rip *ipv4.Address, rport uint16, err error)

func (*Server) Bind

func (s *Server) Bind(port uint16, ip *ipv4.Address) error

func (*Server) BindListen

func (s *Server) BindListen(port uint16, ip *ipv4.Address) error

func (*Server) BindListenWithQueueSize

func (s *Server) BindListenWithQueueSize(port uint16, ip *ipv4.Address, backlog int) error

func (*Server) Close

func (s *Server) Close() error

func (*Server) Listen

func (s *Server) Listen(backlog int) error

type TCB

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

func (*TCB) Abort

func (c *TCB) Abort() error

func (*TCB) Close

func (c *TCB) Close() error

func (*TCB) IsRemoteClosed

func (c *TCB) IsRemoteClosed() bool

func (*TCB) Recv

func (c *TCB) Recv(num int) ([]byte, error)

func (*TCB) Send

func (c *TCB) Send(data []byte) error

Jump to

Keyboard shortcuts

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