Documentation ¶
Index ¶
- func Dial(ctx context.Context, dest net.Destination) (internet.Connection, error)
- func Listen(ctx context.Context, address net.Address, port net.Port, ...) (internet.Listener, error)
- type Config
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) LocalAddr() net.Addr
- func (c *Connection) Read(b []byte) (int, error)
- func (c *Connection) RemoteAddr() net.Addr
- func (c *Connection) SetDeadline(t time.Time) error
- func (c *Connection) SetReadDeadline(t time.Time) error
- func (c *Connection) SetWriteDeadline(t time.Time) error
- func (c *Connection) Write(b []byte) (int, error)
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(ctx context.Context, dest net.Destination) (internet.Connection, error)
Dial dials a new TCP connection to the given destination.
Types ¶
type Config ¶
type Connection ¶
type Connection struct { Reader io.Reader Writer io.Writer Closer common.Closable Local net.Addr Remote net.Addr }
func (*Connection) Close ¶
func (c *Connection) Close() error
func (*Connection) LocalAddr ¶
func (c *Connection) LocalAddr() net.Addr
func (*Connection) Read ¶
func (c *Connection) Read(b []byte) (int, error)
func (*Connection) RemoteAddr ¶
func (c *Connection) RemoteAddr() net.Addr
func (*Connection) SetDeadline ¶
func (c *Connection) SetDeadline(t time.Time) error
func (*Connection) SetReadDeadline ¶
func (c *Connection) SetReadDeadline(t time.Time) error
func (*Connection) SetWriteDeadline ¶
func (c *Connection) SetWriteDeadline(t time.Time) error
func (*Connection) Write ¶
func (c *Connection) Write(b []byte) (int, error)
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.