Documentation
¶
Index ¶
- type Addr
- type Conn
- type Dialer
- type IPAddr
- type IPConn
- func (x *IPConn) File() (f *os.File, err error)
- func (x *IPConn) ReadFrom(b []byte) (int, net.Addr, error)
- func (x *IPConn) ReadFromIP(b []byte) (int, *net.IPAddr, error)
- func (x *IPConn) ReadMsgIP(b []byte, oob []byte) (n int, oobn int, flags int, addr *net.IPAddr, err error)
- func (x *IPConn) SetReadBuffer(bytes int) error
- func (x *IPConn) SetWriteBuffer(bytes int) error
- func (x *IPConn) SyscallConn() (syscall.RawConn, error)
- func (x *IPConn) WriteMsgIP(b []byte, oob []byte, addr *net.IPAddr) (n int, oobn int, err error)
- func (x *IPConn) WriteTo(b []byte, addr net.Addr) (int, error)
- func (x *IPConn) WriteToIP(b []byte, addr *net.IPAddr) (int, error)
- type Listener
- type TCPAddr
- type TCPConn
- func (x *TCPConn) CloseRead() error
- func (x *TCPConn) CloseWrite() error
- func (x *TCPConn) File() (f *os.File, err error)
- func (x *TCPConn) MultipathTCP() (bool, error)
- func (x *TCPConn) ReadFrom(b []byte) (int, net.Addr, error)
- func (x *TCPConn) SetReadBuffer(bytes int) error
- func (x *TCPConn) SetWriteBuffer(bytes int) error
- func (x *TCPConn) WriteTo(b []byte, addr net.Addr) (int, error)
- type TLSConfig
- type TLSConn
- func (x *TLSConn) Close() (err error)
- func (x *TLSConn) CloseWrite() error
- func (x *TLSConn) ConnectionState() tls.ConnectionState
- func (x *TLSConn) Handshake() error
- func (x *TLSConn) HandshakeContext(ctx context.Context) error
- func (x *TLSConn) LocalAddr() net.Addr
- func (x *TLSConn) NetConn() Conn
- func (x *TLSConn) OCSPResponse() []byte
- func (x *TLSConn) Read(p []byte) (n int, err error)
- func (x *TLSConn) ReadBytes(delim byte) (b []byte, err error)
- func (x *TLSConn) ReadLine() (b []byte, err error)
- func (x *TLSConn) ReadString(delim byte) (s string, err error)
- func (x *TLSConn) ReadStringLine() (s string, err error)
- func (x *TLSConn) RemoteAddr() net.Addr
- func (x *TLSConn) SetDeadline(t time.Time) error
- func (x *TLSConn) SetReadDeadline(t time.Time) error
- func (x *TLSConn) SetWriteDeadline(t time.Time) error
- func (x *TLSConn) VerifyHostname(host string) error
- func (x *TLSConn) Write(p []byte) (n int, err error)
- func (x *TLSConn) WriteLine(p []byte) (n int, err error)
- func (x *TLSConn) WriteString(s string) (n int, err error)
- func (x *TLSConn) WriteStringLine(s string) (n int, err error)
- type TLSDialer
- type UDPAddr
- type UDPConn
- func (x *UDPConn) File() (f *os.File, err error)
- func (x *UDPConn) ReadFrom(b []byte) (int, net.Addr, error)
- func (x *UDPConn) ReadFromUDP(b []byte) (n int, addr *net.UDPAddr, err error)
- func (x *UDPConn) ReadFromUDPAddrPort(b []byte) (n int, addr netip.AddrPort, err error)
- func (x *UDPConn) ReadMsgUDP(b []byte, oob []byte) (n int, oobn int, flags int, addr *net.UDPAddr, err error)
- func (x *UDPConn) ReadMsgUDPAddrPort(b []byte, oob []byte) (n int, oobn int, flags int, addr netip.AddrPort, err error)
- func (x *UDPConn) SetReadBuffer(bytes int) error
- func (x *UDPConn) SetWriteBuffer(bytes int) error
- func (x *UDPConn) SyscallConn() (syscall.RawConn, error)
- func (x *UDPConn) WriteMsgUDP(b []byte, oob []byte, addr *net.UDPAddr) (n int, oobn int, err error)
- func (x *UDPConn) WriteMsgUDPAddrPort(b []byte, oob []byte, addr netip.AddrPort) (n int, oobn int, err error)
- func (x *UDPConn) WriteTo(b []byte, addr net.Addr) (int, error)
- func (x *UDPConn) WriteToUDP(b []byte, addr *net.UDPAddr) (int, error)
- func (x *UDPConn) WriteToUDPAddrPort(b []byte, addr netip.AddrPort) (int, error)
- type UnixAddr
- type UnixConn
- func (x *UnixConn) CloseRead() error
- func (x *UnixConn) CloseWrite() error
- func (x *UnixConn) File() (f *os.File, err error)
- func (x *UnixConn) ReadFrom(b []byte) (int, net.Addr, error)
- func (x *UnixConn) ReadFromUnix(b []byte) (int, *net.UnixAddr, error)
- func (x *UnixConn) ReadMsgUnix(b []byte, oob []byte) (n int, oobn int, flags int, addr *net.UnixAddr, err error)
- func (x *UnixConn) SetReadBuffer(bytes int) error
- func (x *UnixConn) SetWriteBuffer(bytes int) error
- func (x *UnixConn) SyscallConn() (syscall.RawConn, error)
- func (x *UnixConn) WriteMsgUnix(b []byte, oob []byte, addr *net.UnixAddr) (n int, oobn int, err error)
- func (x *UnixConn) WriteTo(b []byte, addr net.Addr) (int, error)
- func (x *UnixConn) WriteToUnix(b []byte, addr *net.UnixAddr) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface {
// Read reads data from the connection.
// Read can be made to time out and return an error after a fixed
// time limit; see SetDeadline and SetReadDeadline.
Read(p []byte) (n int, err error)
ReadBytes(delim byte) (b []byte, err error)
ReadLine() (b []byte, err error)
ReadString(delim byte) (s string, err error)
ReadStringLine() (s string, err error)
// Write writes data to the connection.
// Write can be made to time out and return an error after a fixed
// time limit; see SetDeadline and SetWriteDeadline.
Write(p []byte) (n int, err error)
WriteLine(p []byte) (n int, err error)
WriteString(s string) (n int, err error)
WriteStringLine(s string) (n int, err error)
// Close closes the connection.
// Any blocked Read or Write operations will be unblocked and return errors.
Close() (err error)
// LocalAddr returns the local network address, if known.
LocalAddr() net.Addr
// RemoteAddr returns the remote network address, if known.
RemoteAddr() net.Addr
// SetDeadline sets the read and write deadlines associated
// with the connection. It is equivalent to calling both
// SetReadDeadline and SetWriteDeadline.
//
// A deadline is an absolute time after which I/O operations
// fail instead of blocking. The deadline applies to all future
// and pending I/O, not just the immediately following call to
// Read or Write. After a deadline has been exceeded, the
// connection can be refreshed by setting a deadline in the future.
//
// If the deadline is exceeded a call to Read or Write or to other
// I/O methods will return an error that wraps os.ErrDeadlineExceeded.
// This can be tested using errors.Is(err, os.ErrDeadlineExceeded).
// The error's Timeout method will return true, but note that there
// are other possible errors for which the Timeout method will
// return true even if the deadline has not been exceeded.
//
// An idle timeout can be implemented by repeatedly extending
// the deadline after successful Read or Write calls.
//
// A zero value for t means I/O operations will not time out.
SetDeadline(t time.Time) error
// SetReadDeadline sets the deadline for future Read calls
// and any currently-blocked Read call.
// A zero value for t means Read will not time out.
SetReadDeadline(t time.Time) error
// SetWriteDeadline sets the deadline for future Write calls
// and any currently-blocked Write call.
// Even if write times out, it may return n > 0, indicating that
// some of the data was successfully written.
// A zero value for t means Write will not time out.
SetWriteDeadline(t time.Time) error
}
type IPConn ¶
type IPConn struct {
// contains filtered or unexported fields
}
func (*IPConn) SetReadBuffer ¶
func (*IPConn) SetWriteBuffer ¶
func (*IPConn) WriteMsgIP ¶
type Listener ¶
type Listener interface {
// Accept waits for and returns the next connection to the listener.
Accept() (conn Conn, err error)
// Accept waits for and returns the next connection to the listener as an IOData channel.
AcceptChan() (value chan gokit.IOData[Conn])
// Close closes the listener.
// Any blocked Accept operations will be unblocked and return errors.
Close() error
// Addr returns the listener's network address.
Addr() Addr
}
type TCPConn ¶
type TCPConn struct {
// contains filtered or unexported fields
}
func (*TCPConn) CloseWrite ¶
func (*TCPConn) MultipathTCP ¶
func (*TCPConn) SetReadBuffer ¶
func (*TCPConn) SetWriteBuffer ¶
type TLSConn ¶
type TLSConn struct {
// contains filtered or unexported fields
}
func DialTLSWithDialer ¶
func (*TLSConn) CloseWrite ¶
func (*TLSConn) ConnectionState ¶
func (x *TLSConn) ConnectionState() tls.ConnectionState
func (*TLSConn) OCSPResponse ¶
func (*TLSConn) ReadString ¶
func (*TLSConn) ReadStringLine ¶
func (*TLSConn) RemoteAddr ¶
func (*TLSConn) SetDeadline ¶
func (*TLSConn) SetReadDeadline ¶
func (*TLSConn) SetWriteDeadline ¶
func (*TLSConn) VerifyHostname ¶
func (*TLSConn) WriteString ¶
func (*TLSConn) WriteStringLine ¶
type UDPConn ¶
type UDPConn struct {
// contains filtered or unexported fields
}
func (*UDPConn) ReadFromUDP ¶
func (*UDPConn) ReadFromUDPAddrPort ¶
func (*UDPConn) ReadMsgUDP ¶
func (*UDPConn) ReadMsgUDPAddrPort ¶
func (*UDPConn) SetReadBuffer ¶
func (*UDPConn) SetWriteBuffer ¶
func (*UDPConn) WriteMsgUDP ¶
func (*UDPConn) WriteMsgUDPAddrPort ¶
type UnixConn ¶
type UnixConn struct {
// contains filtered or unexported fields
}
func (*UnixConn) CloseWrite ¶
func (*UnixConn) ReadFromUnix ¶
func (*UnixConn) ReadMsgUnix ¶
func (*UnixConn) SetReadBuffer ¶
func (*UnixConn) SetWriteBuffer ¶
func (*UnixConn) WriteMsgUnix ¶
Click to show internal directories.
Click to hide internal directories.