tcp

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tcp represents the imported interface "wasi:sockets/tcp@0.2.0".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration added in v0.0.4

type Duration = monotonicclock.Duration

Duration represents the type alias "wasi:sockets/tcp@0.2.0#duration".

See monotonicclock.Duration for more information.

type ErrorCode added in v0.0.4

type ErrorCode = network.ErrorCode

ErrorCode represents the type alias "wasi:sockets/tcp@0.2.0#error-code".

See network.ErrorCode for more information.

type IPAddressFamily added in v0.0.4

type IPAddressFamily = network.IPAddressFamily

IPAddressFamily represents the type alias "wasi:sockets/tcp@0.2.0#ip-address-family".

See network.IPAddressFamily for more information.

type IPSocketAddress added in v0.0.4

type IPSocketAddress = network.IPSocketAddress

IPSocketAddress represents the type alias "wasi:sockets/tcp@0.2.0#ip-socket-address".

See network.IPSocketAddress for more information.

type IPSocketAddressShape

type IPSocketAddressShape struct {
	// contains filtered or unexported fields
}

IPSocketAddressShape is used for storage in variant or result types.

type InputStream added in v0.0.4

type InputStream = streams.InputStream

InputStream represents the imported type alias "wasi:sockets/tcp@0.2.0#input-stream".

See streams.InputStream for more information.

type Network added in v0.0.4

type Network = network.Network

Network represents the imported type alias "wasi:sockets/tcp@0.2.0#network".

See network.Network for more information.

type OutputStream added in v0.0.4

type OutputStream = streams.OutputStream

OutputStream represents the imported type alias "wasi:sockets/tcp@0.2.0#output-stream".

See streams.OutputStream for more information.

type Pollable added in v0.0.4

type Pollable = poll.Pollable

Pollable represents the imported type alias "wasi:sockets/tcp@0.2.0#pollable".

See poll.Pollable for more information.

type ShutdownType

type ShutdownType uint8

ShutdownType represents the enum "wasi:sockets/tcp@0.2.0#shutdown-type".

enum shutdown-type {
	receive,
	send,
	both
}
const (
	ShutdownTypeReceive ShutdownType = iota
	ShutdownTypeSend
	ShutdownTypeBoth
)

func (ShutdownType) String

func (e ShutdownType) String() string

String implements fmt.Stringer, returning the enum case name of e.

type TCPSocket

type TCPSocket cm.Resource

TCPSocket represents the imported resource "wasi:sockets/tcp@0.2.0#tcp-socket".

resource tcp-socket

func (TCPSocket) Accept

Accept represents the imported method "accept".

accept: func() -> result<tuple<tcp-socket, input-stream, output-stream>, error-code>

func (TCPSocket) AddressFamily

func (self TCPSocket) AddressFamily() (result IPAddressFamily)

AddressFamily represents the imported method "address-family".

address-family: func() -> ip-address-family

func (TCPSocket) FinishBind

func (self TCPSocket) FinishBind() (result cm.Result[ErrorCode, struct{}, ErrorCode])

FinishBind represents the imported method "finish-bind".

finish-bind: func() -> result<_, error-code>

func (TCPSocket) FinishConnect

FinishConnect represents the imported method "finish-connect".

finish-connect: func() -> result<tuple<input-stream, output-stream>, error-code>

func (TCPSocket) FinishListen

func (self TCPSocket) FinishListen() (result cm.Result[ErrorCode, struct{}, ErrorCode])

FinishListen represents the imported method "finish-listen".

finish-listen: func() -> result<_, error-code>

func (TCPSocket) HopLimit

func (self TCPSocket) HopLimit() (result cm.Result[uint8, uint8, ErrorCode])

HopLimit represents the imported method "hop-limit".

hop-limit: func() -> result<u8, error-code>

func (TCPSocket) IsListening

func (self TCPSocket) IsListening() (result bool)

IsListening represents the imported method "is-listening".

is-listening: func() -> bool

func (TCPSocket) KeepAliveCount

func (self TCPSocket) KeepAliveCount() (result cm.Result[uint32, uint32, ErrorCode])

KeepAliveCount represents the imported method "keep-alive-count".

keep-alive-count: func() -> result<u32, error-code>

func (TCPSocket) KeepAliveEnabled

func (self TCPSocket) KeepAliveEnabled() (result cm.Result[bool, bool, ErrorCode])

KeepAliveEnabled represents the imported method "keep-alive-enabled".

keep-alive-enabled: func() -> result<bool, error-code>

func (TCPSocket) KeepAliveIdleTime

func (self TCPSocket) KeepAliveIdleTime() (result cm.Result[uint64, Duration, ErrorCode])

KeepAliveIdleTime represents the imported method "keep-alive-idle-time".

keep-alive-idle-time: func() -> result<duration, error-code>

func (TCPSocket) KeepAliveInterval

func (self TCPSocket) KeepAliveInterval() (result cm.Result[uint64, Duration, ErrorCode])

KeepAliveInterval represents the imported method "keep-alive-interval".

keep-alive-interval: func() -> result<duration, error-code>

func (TCPSocket) LocalAddress

func (self TCPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, IPSocketAddress, ErrorCode])

LocalAddress represents the imported method "local-address".

local-address: func() -> result<ip-socket-address, error-code>

func (TCPSocket) ReceiveBufferSize

func (self TCPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, ErrorCode])

ReceiveBufferSize represents the imported method "receive-buffer-size".

receive-buffer-size: func() -> result<u64, error-code>

func (TCPSocket) RemoteAddress

func (self TCPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, IPSocketAddress, ErrorCode])

RemoteAddress represents the imported method "remote-address".

remote-address: func() -> result<ip-socket-address, error-code>

func (TCPSocket) ResourceDrop

func (self TCPSocket) ResourceDrop()

ResourceDrop represents the imported resource-drop for resource "tcp-socket".

Drops a resource handle.

func (TCPSocket) SendBufferSize

func (self TCPSocket) SendBufferSize() (result cm.Result[uint64, uint64, ErrorCode])

SendBufferSize represents the imported method "send-buffer-size".

send-buffer-size: func() -> result<u64, error-code>

func (TCPSocket) SetHopLimit

func (self TCPSocket) SetHopLimit(value uint8) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetHopLimit represents the imported method "set-hop-limit".

set-hop-limit: func(value: u8) -> result<_, error-code>

func (TCPSocket) SetKeepAliveCount

func (self TCPSocket) SetKeepAliveCount(value uint32) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetKeepAliveCount represents the imported method "set-keep-alive-count".

set-keep-alive-count: func(value: u32) -> result<_, error-code>

func (TCPSocket) SetKeepAliveEnabled

func (self TCPSocket) SetKeepAliveEnabled(value bool) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetKeepAliveEnabled represents the imported method "set-keep-alive-enabled".

set-keep-alive-enabled: func(value: bool) -> result<_, error-code>

func (TCPSocket) SetKeepAliveIdleTime

func (self TCPSocket) SetKeepAliveIdleTime(value Duration) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetKeepAliveIdleTime represents the imported method "set-keep-alive-idle-time".

set-keep-alive-idle-time: func(value: duration) -> result<_, error-code>

func (TCPSocket) SetKeepAliveInterval

func (self TCPSocket) SetKeepAliveInterval(value Duration) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetKeepAliveInterval represents the imported method "set-keep-alive-interval".

set-keep-alive-interval: func(value: duration) -> result<_, error-code>

func (TCPSocket) SetListenBacklogSize

func (self TCPSocket) SetListenBacklogSize(value uint64) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetListenBacklogSize represents the imported method "set-listen-backlog-size".

set-listen-backlog-size: func(value: u64) -> result<_, error-code>

func (TCPSocket) SetReceiveBufferSize

func (self TCPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetReceiveBufferSize represents the imported method "set-receive-buffer-size".

set-receive-buffer-size: func(value: u64) -> result<_, error-code>

func (TCPSocket) SetSendBufferSize

func (self TCPSocket) SetSendBufferSize(value uint64) (result cm.Result[ErrorCode, struct{}, ErrorCode])

SetSendBufferSize represents the imported method "set-send-buffer-size".

set-send-buffer-size: func(value: u64) -> result<_, error-code>

func (TCPSocket) Shutdown

func (self TCPSocket) Shutdown(shutdownType ShutdownType) (result cm.Result[ErrorCode, struct{}, ErrorCode])

Shutdown represents the imported method "shutdown".

shutdown: func(shutdown-type: shutdown-type) -> result<_, error-code>

func (TCPSocket) StartBind

func (self TCPSocket) StartBind(network_ Network, localAddress IPSocketAddress) (result cm.Result[ErrorCode, struct{}, ErrorCode])

StartBind represents the imported method "start-bind".

start-bind: func(network: borrow<network>, local-address: ip-socket-address) ->
result<_, error-code>

func (TCPSocket) StartConnect

func (self TCPSocket) StartConnect(network_ Network, remoteAddress IPSocketAddress) (result cm.Result[ErrorCode, struct{}, ErrorCode])

StartConnect represents the imported method "start-connect".

start-connect: func(network: borrow<network>, remote-address: ip-socket-address)
-> result<_, error-code>

func (TCPSocket) StartListen

func (self TCPSocket) StartListen() (result cm.Result[ErrorCode, struct{}, ErrorCode])

StartListen represents the imported method "start-listen".

start-listen: func() -> result<_, error-code>

func (TCPSocket) Subscribe

func (self TCPSocket) Subscribe() (result Pollable)

Subscribe represents the imported method "subscribe".

subscribe: func() -> pollable

type TupleInputStreamOutputStreamShape

type TupleInputStreamOutputStreamShape struct {
	// contains filtered or unexported fields
}

TupleInputStreamOutputStreamShape is used for storage in variant or result types.

type TupleTCPSocketInputStreamOutputStreamShape

type TupleTCPSocketInputStreamOutputStreamShape struct {
	// contains filtered or unexported fields
}

TupleTCPSocketInputStreamOutputStreamShape is used for storage in variant or result types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL