gtcp

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBindTwice = fmt.Errorf("bind twice")
View Source
var ErrNotTCPAddr = fmt.Errorf("not tcp addr")

Functions

This section is empty.

Types

type Channel

type Channel struct {
	channel.DefaultNetChannel
}

func (*Channel) UnsafeConnect

func (c *Channel) UnsafeConnect(localAddr net.Addr, remoteAddr net.Addr) error

type MockTcpChannel added in v1.9.0

type MockTcpChannel struct {
	channel.MockNetChannel
}

MockTcpChannel is a mock implementation of TCP Channel It embeds MockNetChannel to provide proper mock inheritance

func NewMockTcpChannel added in v1.9.0

func NewMockTcpChannel() *MockTcpChannel

NewMockTcpChannel creates a new MockTcpChannel instance

func (*MockTcpChannel) UnsafeConnect added in v1.9.0

func (m *MockTcpChannel) UnsafeConnect(localAddr net.Addr, remoteAddr net.Addr) error

UnsafeConnect mocks the UnsafeConnect method with TCP address validation

type MockTcpServerChannel added in v1.9.0

type MockTcpServerChannel struct {
	channel.MockServerChannel
	// contains filtered or unexported fields
}

MockTcpServerChannel is a mock implementation of TCP ServerChannel It embeds MockServerChannel to provide proper mock inheritance

func NewMockTcpServerChannel added in v1.9.0

func NewMockTcpServerChannel() *MockTcpServerChannel

NewMockTcpServerChannel creates a new MockTcpServerChannel instance

func (*MockTcpServerChannel) IsActive added in v1.9.0

func (m *MockTcpServerChannel) IsActive() bool

IsActive mocks the IsActive method

func (*MockTcpServerChannel) UnsafeAccept added in v1.9.0

func (m *MockTcpServerChannel) UnsafeAccept() (channel.Channel, channel.Future)

UnsafeAccept mocks the UnsafeAccept method

func (*MockTcpServerChannel) UnsafeBind added in v1.9.0

func (m *MockTcpServerChannel) UnsafeBind(localAddr net.Addr) error

UnsafeBind mocks the UnsafeBind method with TCP binding logic

func (*MockTcpServerChannel) UnsafeClose added in v1.9.0

func (m *MockTcpServerChannel) UnsafeClose() error

UnsafeClose mocks the UnsafeClose method

type ServerChannel

type ServerChannel struct {
	channel.DefaultNetServerChannel
	// contains filtered or unexported fields
}

func (*ServerChannel) IsActive

func (c *ServerChannel) IsActive() bool

func (*ServerChannel) UnsafeAccept

func (c *ServerChannel) UnsafeAccept() (channel.Channel, channel.Future)

func (*ServerChannel) UnsafeBind

func (c *ServerChannel) UnsafeBind(localAddr net.Addr) error

func (*ServerChannel) UnsafeClose

func (c *ServerChannel) UnsafeClose() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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