Documentation
¶
Index ¶
- Variables
- func AsListener[C gonet.Conn](accept func() (C, error), close func() error, addr func() string) (gonet.Listener, error)
- func ConnectToNamedPipe(ctx context.Context, path string) (gonet.Conn, error)
- func NewNamedPipeId() (string, error)
- func NotifyClosed(conn gonet.Conn, onClosed func(), onUnexpectedEnd func(error))
- type CloseWriterConn
- type Host
- func (this Host) Clone() Host
- func (this Host) IsEqualTo(other any) bool
- func (this Host) IsZero() bool
- func (this Host) MarshalText() ([]byte, error)
- func (this *Host) Set(in string) error
- func (this *Host) SetNetAddr(in gonet.Addr) error
- func (this Host) String() string
- func (this *Host) UnmarshalText(in []byte) error
- func (this Host) Validate() error
- func (this Host) WithPort(port uint16) (HostPort, error)
- type HostPort
- func (this HostPort) Clone() HostPort
- func (this HostPort) IsEqualTo(other any) bool
- func (this HostPort) IsZero() bool
- func (this HostPort) MarshalText() ([]byte, error)
- func (this *HostPort) Set(in string) error
- func (this HostPort) String() string
- func (this *HostPort) UnmarshalText(in []byte) error
- func (this HostPort) Validate() error
- type NamedPipe
- type NetAddress
- func (this NetAddress) Get() gonet.Addr
- func (this NetAddress) IsEqualTo(other any) bool
- func (this NetAddress) IsZero() bool
- func (this NetAddress) Listen() (gonet.Listener, error)
- func (this NetAddress) MarshalText() (text []byte, err error)
- func (this *NetAddress) Set(text string) error
- func (this NetAddress) String() string
- func (this *NetAddress) UnmarshalText(text []byte) error
- type NetAddresses
- type Purpose
- func (this Purpose) Clone() Purpose
- func (this Purpose) IsEqualTo(other any) bool
- func (this Purpose) IsZero() bool
- func (this Purpose) MarshalText() ([]byte, error)
- func (this *Purpose) Set(in string) error
- func (this Purpose) String() string
- func (this *Purpose) UnmarshalText(in []byte) error
- func (this Purpose) Validate() error
- type Remote
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrIllegalPurpose = errors.Config.Newf("illegal purpose")
)
View Source
var (
ErrNotifyClosedUnsupported = errors.Network.Newf("notify closed is not supported for this connection")
)
Functions ¶
func AsListener ¶ added in v0.4.0
func ConnectToNamedPipe ¶ added in v0.4.0
func NewNamedPipeId ¶ added in v0.4.0
func NotifyClosed ¶ added in v0.4.0
Types ¶
type CloseWriterConn ¶ added in v0.4.0
type CloseWriterConn interface {
gonet.Conn
sys.CloseWriter
}
func AsCloseWriterConn ¶ added in v0.4.0
func AsCloseWriterConn(conn gonet.Conn) CloseWriterConn
type Host ¶
func MustNewHost ¶ added in v0.4.0
func (Host) MarshalText ¶
func (*Host) UnmarshalText ¶
type HostPort ¶ added in v0.4.0
func MustNewHostPort ¶ added in v0.4.0
func NewHostPort ¶ added in v0.4.0
func (HostPort) MarshalText ¶ added in v0.4.0
func (*HostPort) UnmarshalText ¶ added in v0.4.0
type NamedPipe ¶ added in v0.4.0
type NamedPipe interface {
gonet.Listener
AcceptConn() (CloseWriterConn, error)
Path() string
}
func AsNamedPipe ¶ added in v0.4.0
func NewNamedPipe ¶ added in v0.4.0
type NetAddress ¶
type NetAddress struct {
// contains filtered or unexported fields
}
func MustNewNetAddress ¶
func MustNewNetAddress(plain string) NetAddress
func NewNetAddress ¶
func NewNetAddress(plain string) (NetAddress, error)
func (NetAddress) Get ¶
func (this NetAddress) Get() gonet.Addr
func (NetAddress) IsEqualTo ¶
func (this NetAddress) IsEqualTo(other any) bool
func (NetAddress) IsZero ¶
func (this NetAddress) IsZero() bool
func (NetAddress) MarshalText ¶
func (this NetAddress) MarshalText() (text []byte, err error)
func (*NetAddress) Set ¶
func (this *NetAddress) Set(text string) error
func (NetAddress) String ¶
func (this NetAddress) String() string
func (*NetAddress) UnmarshalText ¶
func (this *NetAddress) UnmarshalText(text []byte) error
type NetAddresses ¶
type NetAddresses []NetAddress
func (NetAddresses) IsEqualTo ¶
func (this NetAddresses) IsEqualTo(other any) bool
func (*NetAddresses) Trim ¶
func (this *NetAddresses) Trim() error
func (*NetAddresses) Validate ¶
func (this *NetAddresses) Validate() error
type Purpose ¶ added in v0.4.0
type Purpose string
func (Purpose) MarshalText ¶ added in v0.4.0
func (*Purpose) UnmarshalText ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.