Documentation ¶
Index ¶
- func SetHostAcceptedFD(fd int32)
- func SetHostDialedFD(fd int32)
- type Conn
- type Listener
- type TCPConn
- func (c *TCPConn) Close() error
- func (c *TCPConn) Fd() int32
- func (c *TCPConn) LocalAddr() net.Addr
- func (c *TCPConn) Read(b []byte) (n int, err error)
- func (c *TCPConn) RemoteAddr() net.Addr
- func (c *TCPConn) SetDeadline(t time.Time) error
- func (c *TCPConn) SetNonBlock(nonblocking bool) error
- func (c *TCPConn) SetReadDeadline(t time.Time) error
- func (c *TCPConn) SetWriteDeadline(t time.Time) error
- func (c *TCPConn) SyscallConn() (syscall.RawConn, error)
- func (c *TCPConn) Write(b []byte) (n int, writeErr error)
- type TCPListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetHostAcceptedFD ¶
func SetHostAcceptedFD(fd int32)
func SetHostDialedFD ¶
func SetHostDialedFD(fd int32)
Types ¶
type Conn ¶
Conn is the interface for a generic stream-oriented network connection.
func Dial ¶
Dial dials a remote host for a network connection.
In v0, network and address parameters are ignored, and it is internally called as HostManagedDial.
func HostManagedAccept ¶
HostManagedAccept asks the host to accept a connection.
func HostManagedDial ¶
HostManagedDial asks the host to dial a remote host predefined by the host.
type TCPConn ¶
type TCPConn struct {
// contains filtered or unexported fields
}
TCPConn is a wrapper around a file descriptor that implements the net.Conn.
Despite the name, this type is not specific to TCP connections. It can be used for any file descriptor that is connection-oriented.
func RebuildTCPConn ¶
RebuildTCPConn recovers a TCPConn from a file descriptor.
func (*TCPConn) LocalAddr ¶
LocalAddr implements net.Conn.LocalAddr.
This function is currently not implemented, but may be fleshed out in the future should there be better support for getting the local address of a socket managed by the Go runtime.
func (*TCPConn) Read ¶
Read implements net.Conn.Read.
func (*TCPConn) RemoteAddr ¶
RemoteAddr implements net.Conn.RemoteAddr.
This function is currently not implemented, but may be fleshed out in the future should there be better support for getting the remote address of a socket managed by the Go runtime.
func (*TCPConn) SetDeadline ¶
SetDeadline implements net.Conn.SetDeadline.
func (*TCPConn) SetNonBlock ¶
SetNonBlock sets the socket to blocking or non-blocking mode.
func (*TCPConn) SetReadDeadline ¶
SetReadDeadline implements net.Conn.SetReadDeadline.
func (*TCPConn) SetWriteDeadline ¶
SetWriteDeadline implements net.Conn.SetWriteDeadline.
func (*TCPConn) SyscallConn ¶
SyscallConn implements syscall.Conn.
type TCPListener ¶
type TCPListener struct { }
TCPListener is a fake TCP listener which calls to the host to accept a connection.
By saying "fake", it means that the file descriptor is not managed inside the WATM, but by the host application.
func (*TCPListener) Accept ¶
func (l *TCPListener) Accept() (Conn, error)