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
}
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
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
Click to show internal directories.
Click to hide internal directories.