mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-10 14:39:31 +00:00
internal/wasi: update to wasm-tools-go@v0.1.2 (#4326)
* internal/wasi: update to wasm-tools-go@v0.1.1 See https://github.com/ydnar/wasm-tools-go/releases/tag/v0.1.1 for additional information. * internal/wasi: update to wasm-tools-go@v0.1.2 * internal/wasi: regenerate with wasm-tools-go@v0.1.3
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
//go:build !wasip1
|
||||
|
||||
package ipnamelookup
|
||||
|
||||
import (
|
||||
"github.com/ydnar/wasm-tools-go/cm"
|
||||
"internal/wasi/sockets/v0.2.0/network"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// OptionIPAddressShape is used for storage in variant or result types.
|
||||
type OptionIPAddressShape struct {
|
||||
shape [unsafe.Sizeof(cm.Option[network.IPAddress]{})]byte
|
||||
}
|
||||
@@ -53,7 +53,7 @@ func wasmimport_ResolveAddressStreamResourceDrop(self0 uint32)
|
||||
// resolve-next-address: func() -> result<option<ip-address>, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self ResolveAddressStream) ResolveNextAddress() (result cm.OKResult[cm.Option[network.IPAddress], network.ErrorCode]) {
|
||||
func (self ResolveAddressStream) ResolveNextAddress() (result cm.Result[OptionIPAddressShape, cm.Option[network.IPAddress], network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_ResolveAddressStreamResolveNextAddress((uint32)(self0), &result)
|
||||
return
|
||||
@@ -61,7 +61,7 @@ func (self ResolveAddressStream) ResolveNextAddress() (result cm.OKResult[cm.Opt
|
||||
|
||||
//go:wasmimport wasi:sockets/ip-name-lookup@0.2.0 [method]resolve-address-stream.resolve-next-address
|
||||
//go:noescape
|
||||
func wasmimport_ResolveAddressStreamResolveNextAddress(self0 uint32, result *cm.OKResult[cm.Option[network.IPAddress], network.ErrorCode])
|
||||
func wasmimport_ResolveAddressStreamResolveNextAddress(self0 uint32, result *cm.Result[OptionIPAddressShape, cm.Option[network.IPAddress], network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
@@ -111,7 +111,7 @@ func wasmimport_ResolveAddressStreamSubscribe(self0 uint32) (result0 uint32)
|
||||
// error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func ResolveAddresses(network_ network.Network, name string) (result cm.OKResult[ResolveAddressStream, network.ErrorCode]) {
|
||||
func ResolveAddresses(network_ network.Network, name string) (result cm.Result[ResolveAddressStream, ResolveAddressStream, network.ErrorCode]) {
|
||||
network0 := cm.Reinterpret[uint32](network_)
|
||||
name0, name1 := cm.LowerString(name)
|
||||
wasmimport_ResolveAddresses((uint32)(network0), (*uint8)(name0), (uint32)(name1), &result)
|
||||
@@ -120,4 +120,4 @@ func ResolveAddresses(network_ network.Network, name string) (result cm.OKResult
|
||||
|
||||
//go:wasmimport wasi:sockets/ip-name-lookup@0.2.0 resolve-addresses
|
||||
//go:noescape
|
||||
func wasmimport_ResolveAddresses(network0 uint32, name0 *uint8, name1 uint32, result *cm.OKResult[ResolveAddressStream, network.ErrorCode])
|
||||
func wasmimport_ResolveAddresses(network0 uint32, name0 *uint8, name1 uint32, result *cm.Result[ResolveAddressStream, ResolveAddressStream, network.ErrorCode])
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by wit-bindgen-go. DO NOT EDIT.
|
||||
|
||||
//go:build !wasip1
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// IPv6SocketAddressShape is used for storage in variant or result types.
|
||||
type IPv6SocketAddressShape struct {
|
||||
shape [unsafe.Sizeof(IPv6SocketAddress{})]byte
|
||||
}
|
||||
@@ -159,6 +159,35 @@ const (
|
||||
ErrorCodePermanentResolverFailure
|
||||
)
|
||||
|
||||
var stringsErrorCode = [21]string{
|
||||
"unknown",
|
||||
"access-denied",
|
||||
"not-supported",
|
||||
"invalid-argument",
|
||||
"out-of-memory",
|
||||
"timeout",
|
||||
"concurrency-conflict",
|
||||
"not-in-progress",
|
||||
"would-block",
|
||||
"invalid-state",
|
||||
"new-socket-limit",
|
||||
"address-not-bindable",
|
||||
"address-in-use",
|
||||
"remote-unreachable",
|
||||
"connection-refused",
|
||||
"connection-reset",
|
||||
"connection-aborted",
|
||||
"datagram-too-large",
|
||||
"name-unresolvable",
|
||||
"temporary-resolver-failure",
|
||||
"permanent-resolver-failure",
|
||||
}
|
||||
|
||||
// String implements [fmt.Stringer], returning the enum case name of e.
|
||||
func (e ErrorCode) String() string {
|
||||
return stringsErrorCode[e]
|
||||
}
|
||||
|
||||
// IPAddressFamily represents the enum "wasi:sockets/network@0.2.0#ip-address-family".
|
||||
//
|
||||
// enum ip-address-family {
|
||||
@@ -175,6 +204,16 @@ const (
|
||||
IPAddressFamilyIPv6
|
||||
)
|
||||
|
||||
var stringsIPAddressFamily = [2]string{
|
||||
"ipv4",
|
||||
"ipv6",
|
||||
}
|
||||
|
||||
// String implements [fmt.Stringer], returning the enum case name of e.
|
||||
func (e IPAddressFamily) String() string {
|
||||
return stringsIPAddressFamily[e]
|
||||
}
|
||||
|
||||
// IPv4Address represents the tuple "wasi:sockets/network@0.2.0#ipv4-address".
|
||||
//
|
||||
// type ipv4-address = tuple<u8, u8, u8, u8>
|
||||
@@ -255,7 +294,7 @@ type IPv6SocketAddress struct {
|
||||
// ipv4(ipv4-socket-address),
|
||||
// ipv6(ipv6-socket-address),
|
||||
// }
|
||||
type IPSocketAddress cm.Variant[uint8, IPv6SocketAddress, IPv6SocketAddress]
|
||||
type IPSocketAddress cm.Variant[uint8, IPv6SocketAddressShape, IPv6SocketAddress]
|
||||
|
||||
// IPSocketAddressIPv4 returns a [IPSocketAddress] of case "ipv4".
|
||||
func IPSocketAddressIPv4(data IPv4SocketAddress) IPSocketAddress {
|
||||
|
||||
@@ -43,7 +43,7 @@ import (
|
||||
// error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func CreateTCPSocket(addressFamily network.IPAddressFamily) (result cm.OKResult[tcp.TCPSocket, network.ErrorCode]) {
|
||||
func CreateTCPSocket(addressFamily network.IPAddressFamily) (result cm.Result[tcp.TCPSocket, tcp.TCPSocket, network.ErrorCode]) {
|
||||
addressFamily0 := (uint32)(addressFamily)
|
||||
wasmimport_CreateTCPSocket((uint32)(addressFamily0), &result)
|
||||
return
|
||||
@@ -51,4 +51,4 @@ func CreateTCPSocket(addressFamily network.IPAddressFamily) (result cm.OKResult[
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp-create-socket@0.2.0 create-tcp-socket
|
||||
//go:noescape
|
||||
func wasmimport_CreateTCPSocket(addressFamily0 uint32, result *cm.OKResult[tcp.TCPSocket, network.ErrorCode])
|
||||
func wasmimport_CreateTCPSocket(addressFamily0 uint32, result *cm.Result[tcp.TCPSocket, tcp.TCPSocket, network.ErrorCode])
|
||||
|
||||
@@ -6,9 +6,26 @@ package tcp
|
||||
|
||||
import (
|
||||
"github.com/ydnar/wasm-tools-go/cm"
|
||||
"internal/wasi/io/v0.2.0/streams"
|
||||
"internal/wasi/sockets/v0.2.0/network"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// TupleTCPSocketInputStreamOutputStreamShape is used for storage in variant or result types.
|
||||
type TupleTCPSocketInputStreamOutputStreamShape struct {
|
||||
shape [unsafe.Sizeof(cm.Tuple3[TCPSocket, streams.InputStream, streams.OutputStream]{})]byte
|
||||
}
|
||||
|
||||
// TupleInputStreamOutputStreamShape is used for storage in variant or result types.
|
||||
type TupleInputStreamOutputStreamShape struct {
|
||||
shape [unsafe.Sizeof(cm.Tuple[streams.InputStream, streams.OutputStream]{})]byte
|
||||
}
|
||||
|
||||
// IPSocketAddressShape is used for storage in variant or result types.
|
||||
type IPSocketAddressShape struct {
|
||||
shape [unsafe.Sizeof(network.IPSocketAddress{})]byte
|
||||
}
|
||||
|
||||
func lower_IPv4Address(v network.IPv4Address) (f0 uint32, f1 uint32, f2 uint32, f3 uint32) {
|
||||
f0 = (uint32)(v[0])
|
||||
f1 = (uint32)(v[1])
|
||||
@@ -44,7 +61,7 @@ func lower_IPv6SocketAddress(v network.IPv6SocketAddress) (f0 uint32, f1 uint32,
|
||||
}
|
||||
|
||||
func lower_IPSocketAddress(v network.IPSocketAddress) (f0 uint32, f1 uint32, f2 uint32, f3 uint32, f4 uint32, f5 uint32, f6 uint32, f7 uint32, f8 uint32, f9 uint32, f10 uint32, f11 uint32) {
|
||||
f0 = (uint32)(cm.Tag(&v))
|
||||
f0 = (uint32)(v.Tag())
|
||||
switch f0 {
|
||||
case 0: // ipv4
|
||||
v1, v2, v3, v4, v5 := lower_IPv4SocketAddress(*v.IPv4())
|
||||
|
||||
@@ -33,6 +33,17 @@ const (
|
||||
ShutdownTypeBoth
|
||||
)
|
||||
|
||||
var stringsShutdownType = [3]string{
|
||||
"receive",
|
||||
"send",
|
||||
"both",
|
||||
}
|
||||
|
||||
// String implements [fmt.Stringer], returning the enum case name of e.
|
||||
func (e ShutdownType) String() string {
|
||||
return stringsShutdownType[e]
|
||||
}
|
||||
|
||||
// TCPSocket represents the imported resource "wasi:sockets/tcp@0.2.0#tcp-socket".
|
||||
//
|
||||
// A TCP socket resource.
|
||||
@@ -111,7 +122,7 @@ func wasmimport_TCPSocketResourceDrop(self0 uint32)
|
||||
// accept: func() -> result<tuple<tcp-socket, input-stream, output-stream>, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) Accept() (result cm.OKResult[cm.Tuple3[TCPSocket, streams.InputStream, streams.OutputStream], network.ErrorCode]) {
|
||||
func (self TCPSocket) Accept() (result cm.Result[TupleTCPSocketInputStreamOutputStreamShape, cm.Tuple3[TCPSocket, streams.InputStream, streams.OutputStream], network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketAccept((uint32)(self0), &result)
|
||||
return
|
||||
@@ -119,7 +130,7 @@ func (self TCPSocket) Accept() (result cm.OKResult[cm.Tuple3[TCPSocket, streams.
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.accept
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketAccept(self0 uint32, result *cm.OKResult[cm.Tuple3[TCPSocket, streams.InputStream, streams.OutputStream], network.ErrorCode])
|
||||
func wasmimport_TCPSocketAccept(self0 uint32, result *cm.Result[TupleTCPSocketInputStreamOutputStreamShape, cm.Tuple3[TCPSocket, streams.InputStream, streams.OutputStream], network.ErrorCode])
|
||||
|
||||
// AddressFamily represents the imported method "address-family".
|
||||
//
|
||||
@@ -146,7 +157,7 @@ func wasmimport_TCPSocketAddressFamily(self0 uint32) (result0 uint32)
|
||||
// finish-bind: func() -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) FinishBind() (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) FinishBind() (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketFinishBind((uint32)(self0), &result)
|
||||
return
|
||||
@@ -154,14 +165,14 @@ func (self TCPSocket) FinishBind() (result cm.ErrResult[struct{}, network.ErrorC
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.finish-bind
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketFinishBind(self0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketFinishBind(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// FinishConnect represents the imported method "finish-connect".
|
||||
//
|
||||
// finish-connect: func() -> result<tuple<input-stream, output-stream>, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) FinishConnect() (result cm.OKResult[cm.Tuple[streams.InputStream, streams.OutputStream], network.ErrorCode]) {
|
||||
func (self TCPSocket) FinishConnect() (result cm.Result[TupleInputStreamOutputStreamShape, cm.Tuple[streams.InputStream, streams.OutputStream], network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketFinishConnect((uint32)(self0), &result)
|
||||
return
|
||||
@@ -169,14 +180,14 @@ func (self TCPSocket) FinishConnect() (result cm.OKResult[cm.Tuple[streams.Input
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.finish-connect
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketFinishConnect(self0 uint32, result *cm.OKResult[cm.Tuple[streams.InputStream, streams.OutputStream], network.ErrorCode])
|
||||
func wasmimport_TCPSocketFinishConnect(self0 uint32, result *cm.Result[TupleInputStreamOutputStreamShape, cm.Tuple[streams.InputStream, streams.OutputStream], network.ErrorCode])
|
||||
|
||||
// FinishListen represents the imported method "finish-listen".
|
||||
//
|
||||
// finish-listen: func() -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) FinishListen() (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) FinishListen() (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketFinishListen((uint32)(self0), &result)
|
||||
return
|
||||
@@ -184,7 +195,7 @@ func (self TCPSocket) FinishListen() (result cm.ErrResult[struct{}, network.Erro
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.finish-listen
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketFinishListen(self0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketFinishListen(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// HopLimit represents the imported method "hop-limit".
|
||||
//
|
||||
@@ -198,7 +209,7 @@ func wasmimport_TCPSocketFinishListen(self0 uint32, result *cm.ErrResult[struct{
|
||||
// hop-limit: func() -> result<u8, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) HopLimit() (result cm.OKResult[uint8, network.ErrorCode]) {
|
||||
func (self TCPSocket) HopLimit() (result cm.Result[uint8, uint8, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketHopLimit((uint32)(self0), &result)
|
||||
return
|
||||
@@ -206,7 +217,7 @@ func (self TCPSocket) HopLimit() (result cm.OKResult[uint8, network.ErrorCode])
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.hop-limit
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketHopLimit(self0 uint32, result *cm.OKResult[uint8, network.ErrorCode])
|
||||
func wasmimport_TCPSocketHopLimit(self0 uint32, result *cm.Result[uint8, uint8, network.ErrorCode])
|
||||
|
||||
// IsListening represents the imported method "is-listening".
|
||||
//
|
||||
@@ -246,7 +257,7 @@ func wasmimport_TCPSocketIsListening(self0 uint32) (result0 uint32)
|
||||
// keep-alive-count: func() -> result<u32, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) KeepAliveCount() (result cm.OKResult[uint32, network.ErrorCode]) {
|
||||
func (self TCPSocket) KeepAliveCount() (result cm.Result[uint32, uint32, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketKeepAliveCount((uint32)(self0), &result)
|
||||
return
|
||||
@@ -254,7 +265,7 @@ func (self TCPSocket) KeepAliveCount() (result cm.OKResult[uint32, network.Error
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-count
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketKeepAliveCount(self0 uint32, result *cm.OKResult[uint32, network.ErrorCode])
|
||||
func wasmimport_TCPSocketKeepAliveCount(self0 uint32, result *cm.Result[uint32, uint32, network.ErrorCode])
|
||||
|
||||
// KeepAliveEnabled represents the imported method "keep-alive-enabled".
|
||||
//
|
||||
@@ -272,7 +283,7 @@ func wasmimport_TCPSocketKeepAliveCount(self0 uint32, result *cm.OKResult[uint32
|
||||
// keep-alive-enabled: func() -> result<bool, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) KeepAliveEnabled() (result cm.OKResult[bool, network.ErrorCode]) {
|
||||
func (self TCPSocket) KeepAliveEnabled() (result cm.Result[bool, bool, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketKeepAliveEnabled((uint32)(self0), &result)
|
||||
return
|
||||
@@ -280,7 +291,7 @@ func (self TCPSocket) KeepAliveEnabled() (result cm.OKResult[bool, network.Error
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-enabled
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketKeepAliveEnabled(self0 uint32, result *cm.OKResult[bool, network.ErrorCode])
|
||||
func wasmimport_TCPSocketKeepAliveEnabled(self0 uint32, result *cm.Result[bool, bool, network.ErrorCode])
|
||||
|
||||
// KeepAliveIdleTime represents the imported method "keep-alive-idle-time".
|
||||
//
|
||||
@@ -301,7 +312,7 @@ func wasmimport_TCPSocketKeepAliveEnabled(self0 uint32, result *cm.OKResult[bool
|
||||
// keep-alive-idle-time: func() -> result<duration, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) KeepAliveIdleTime() (result cm.OKResult[monotonicclock.Duration, network.ErrorCode]) {
|
||||
func (self TCPSocket) KeepAliveIdleTime() (result cm.Result[uint64, monotonicclock.Duration, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketKeepAliveIdleTime((uint32)(self0), &result)
|
||||
return
|
||||
@@ -309,7 +320,7 @@ func (self TCPSocket) KeepAliveIdleTime() (result cm.OKResult[monotonicclock.Dur
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-idle-time
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketKeepAliveIdleTime(self0 uint32, result *cm.OKResult[monotonicclock.Duration, network.ErrorCode])
|
||||
func wasmimport_TCPSocketKeepAliveIdleTime(self0 uint32, result *cm.Result[uint64, monotonicclock.Duration, network.ErrorCode])
|
||||
|
||||
// KeepAliveInterval represents the imported method "keep-alive-interval".
|
||||
//
|
||||
@@ -329,7 +340,7 @@ func wasmimport_TCPSocketKeepAliveIdleTime(self0 uint32, result *cm.OKResult[mon
|
||||
// keep-alive-interval: func() -> result<duration, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) KeepAliveInterval() (result cm.OKResult[monotonicclock.Duration, network.ErrorCode]) {
|
||||
func (self TCPSocket) KeepAliveInterval() (result cm.Result[uint64, monotonicclock.Duration, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketKeepAliveInterval((uint32)(self0), &result)
|
||||
return
|
||||
@@ -337,7 +348,7 @@ func (self TCPSocket) KeepAliveInterval() (result cm.OKResult[monotonicclock.Dur
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.keep-alive-interval
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketKeepAliveInterval(self0 uint32, result *cm.OKResult[monotonicclock.Duration, network.ErrorCode])
|
||||
func wasmimport_TCPSocketKeepAliveInterval(self0 uint32, result *cm.Result[uint64, monotonicclock.Duration, network.ErrorCode])
|
||||
|
||||
// LocalAddress represents the imported method "local-address".
|
||||
//
|
||||
@@ -362,7 +373,7 @@ func wasmimport_TCPSocketKeepAliveInterval(self0 uint32, result *cm.OKResult[mon
|
||||
// local-address: func() -> result<ip-socket-address, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) LocalAddress() (result cm.OKResult[network.IPSocketAddress, network.ErrorCode]) {
|
||||
func (self TCPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketLocalAddress((uint32)(self0), &result)
|
||||
return
|
||||
@@ -370,7 +381,7 @@ func (self TCPSocket) LocalAddress() (result cm.OKResult[network.IPSocketAddress
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.local-address
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketLocalAddress(self0 uint32, result *cm.OKResult[network.IPSocketAddress, network.ErrorCode])
|
||||
func wasmimport_TCPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
|
||||
|
||||
// ReceiveBufferSize represents the imported method "receive-buffer-size".
|
||||
//
|
||||
@@ -390,7 +401,7 @@ func wasmimport_TCPSocketLocalAddress(self0 uint32, result *cm.OKResult[network.
|
||||
// receive-buffer-size: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) ReceiveBufferSize() (result cm.OKResult[uint64, network.ErrorCode]) {
|
||||
func (self TCPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketReceiveBufferSize((uint32)(self0), &result)
|
||||
return
|
||||
@@ -398,7 +409,7 @@ func (self TCPSocket) ReceiveBufferSize() (result cm.OKResult[uint64, network.Er
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.receive-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketReceiveBufferSize(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
|
||||
func wasmimport_TCPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// RemoteAddress represents the imported method "remote-address".
|
||||
//
|
||||
@@ -416,7 +427,7 @@ func wasmimport_TCPSocketReceiveBufferSize(self0 uint32, result *cm.OKResult[uin
|
||||
// remote-address: func() -> result<ip-socket-address, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) RemoteAddress() (result cm.OKResult[network.IPSocketAddress, network.ErrorCode]) {
|
||||
func (self TCPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketRemoteAddress((uint32)(self0), &result)
|
||||
return
|
||||
@@ -424,14 +435,14 @@ func (self TCPSocket) RemoteAddress() (result cm.OKResult[network.IPSocketAddres
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.remote-address
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketRemoteAddress(self0 uint32, result *cm.OKResult[network.IPSocketAddress, network.ErrorCode])
|
||||
func wasmimport_TCPSocketRemoteAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
|
||||
|
||||
// SendBufferSize represents the imported method "send-buffer-size".
|
||||
//
|
||||
// send-buffer-size: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SendBufferSize() (result cm.OKResult[uint64, network.ErrorCode]) {
|
||||
func (self TCPSocket) SendBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketSendBufferSize((uint32)(self0), &result)
|
||||
return
|
||||
@@ -439,14 +450,14 @@ func (self TCPSocket) SendBufferSize() (result cm.OKResult[uint64, network.Error
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.send-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSendBufferSize(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSendBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// SetHopLimit represents the imported method "set-hop-limit".
|
||||
//
|
||||
// set-hop-limit: func(value: u8) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetHopLimit(value uint8) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetHopLimit(value uint8) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint32)(value)
|
||||
wasmimport_TCPSocketSetHopLimit((uint32)(self0), (uint32)(value0), &result)
|
||||
@@ -455,14 +466,14 @@ func (self TCPSocket) SetHopLimit(value uint8) (result cm.ErrResult[struct{}, ne
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-hop-limit
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetHopLimit(self0 uint32, value0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetHopLimit(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetKeepAliveCount represents the imported method "set-keep-alive-count".
|
||||
//
|
||||
// set-keep-alive-count: func(value: u32) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetKeepAliveCount(value uint32) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetKeepAliveCount(value uint32) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint32)(value)
|
||||
wasmimport_TCPSocketSetKeepAliveCount((uint32)(self0), (uint32)(value0), &result)
|
||||
@@ -471,14 +482,14 @@ func (self TCPSocket) SetKeepAliveCount(value uint32) (result cm.ErrResult[struc
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-count
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetKeepAliveCount(self0 uint32, value0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetKeepAliveCount(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetKeepAliveEnabled represents the imported method "set-keep-alive-enabled".
|
||||
//
|
||||
// set-keep-alive-enabled: func(value: bool) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetKeepAliveEnabled(value bool) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetKeepAliveEnabled(value bool) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := cm.BoolToU32(value)
|
||||
wasmimport_TCPSocketSetKeepAliveEnabled((uint32)(self0), (uint32)(value0), &result)
|
||||
@@ -487,14 +498,14 @@ func (self TCPSocket) SetKeepAliveEnabled(value bool) (result cm.ErrResult[struc
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-enabled
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetKeepAliveEnabled(self0 uint32, value0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetKeepAliveEnabled(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetKeepAliveIdleTime represents the imported method "set-keep-alive-idle-time".
|
||||
//
|
||||
// set-keep-alive-idle-time: func(value: duration) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetKeepAliveIdleTime(value monotonicclock.Duration) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetKeepAliveIdleTime(value monotonicclock.Duration) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_TCPSocketSetKeepAliveIdleTime((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -503,14 +514,14 @@ func (self TCPSocket) SetKeepAliveIdleTime(value monotonicclock.Duration) (resul
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-idle-time
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetKeepAliveIdleTime(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetKeepAliveIdleTime(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetKeepAliveInterval represents the imported method "set-keep-alive-interval".
|
||||
//
|
||||
// set-keep-alive-interval: func(value: duration) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetKeepAliveInterval(value monotonicclock.Duration) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetKeepAliveInterval(value monotonicclock.Duration) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_TCPSocketSetKeepAliveInterval((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -519,7 +530,7 @@ func (self TCPSocket) SetKeepAliveInterval(value monotonicclock.Duration) (resul
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-keep-alive-interval
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetKeepAliveInterval(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetKeepAliveInterval(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetListenBacklogSize represents the imported method "set-listen-backlog-size".
|
||||
//
|
||||
@@ -539,7 +550,7 @@ func wasmimport_TCPSocketSetKeepAliveInterval(self0 uint32, value0 uint64, resul
|
||||
// set-listen-backlog-size: func(value: u64) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetListenBacklogSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetListenBacklogSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_TCPSocketSetListenBacklogSize((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -548,14 +559,14 @@ func (self TCPSocket) SetListenBacklogSize(value uint64) (result cm.ErrResult[st
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-listen-backlog-size
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetListenBacklogSize(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetListenBacklogSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetReceiveBufferSize represents the imported method "set-receive-buffer-size".
|
||||
//
|
||||
// set-receive-buffer-size: func(value: u64) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetReceiveBufferSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_TCPSocketSetReceiveBufferSize((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -564,14 +575,14 @@ func (self TCPSocket) SetReceiveBufferSize(value uint64) (result cm.ErrResult[st
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-receive-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetSendBufferSize represents the imported method "set-send-buffer-size".
|
||||
//
|
||||
// set-send-buffer-size: func(value: u64) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) SetSendBufferSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) SetSendBufferSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_TCPSocketSetSendBufferSize((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -580,7 +591,7 @@ func (self TCPSocket) SetSendBufferSize(value uint64) (result cm.ErrResult[struc
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.set-send-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// Shutdown represents the imported method "shutdown".
|
||||
//
|
||||
@@ -611,7 +622,7 @@ func wasmimport_TCPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *
|
||||
// shutdown: func(shutdown-type: shutdown-type) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) Shutdown(shutdownType ShutdownType) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) Shutdown(shutdownType ShutdownType) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
shutdownType0 := (uint32)(shutdownType)
|
||||
wasmimport_TCPSocketShutdown((uint32)(self0), (uint32)(shutdownType0), &result)
|
||||
@@ -620,7 +631,7 @@ func (self TCPSocket) Shutdown(shutdownType ShutdownType) (result cm.ErrResult[s
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.shutdown
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketShutdown(self0 uint32, shutdownType0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketShutdown(self0 uint32, shutdownType0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// StartBind represents the imported method "start-bind".
|
||||
//
|
||||
@@ -676,7 +687,7 @@ func wasmimport_TCPSocketShutdown(self0 uint32, shutdownType0 uint32, result *cm
|
||||
// result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) StartBind(network_ network.Network, localAddress network.IPSocketAddress) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) StartBind(network_ network.Network, localAddress network.IPSocketAddress) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
network0 := cm.Reinterpret[uint32](network_)
|
||||
localAddress0, localAddress1, localAddress2, localAddress3, localAddress4, localAddress5, localAddress6, localAddress7, localAddress8, localAddress9, localAddress10, localAddress11 := lower_IPSocketAddress(localAddress)
|
||||
@@ -686,7 +697,7 @@ func (self TCPSocket) StartBind(network_ network.Network, localAddress network.I
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.start-bind
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketStartBind(self0 uint32, network0 uint32, localAddress0 uint32, localAddress1 uint32, localAddress2 uint32, localAddress3 uint32, localAddress4 uint32, localAddress5 uint32, localAddress6 uint32, localAddress7 uint32, localAddress8 uint32, localAddress9 uint32, localAddress10 uint32, localAddress11 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketStartBind(self0 uint32, network0 uint32, localAddress0 uint32, localAddress1 uint32, localAddress2 uint32, localAddress3 uint32, localAddress4 uint32, localAddress5 uint32, localAddress6 uint32, localAddress7 uint32, localAddress8 uint32, localAddress9 uint32, localAddress10 uint32, localAddress11 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// StartConnect represents the imported method "start-connect".
|
||||
//
|
||||
@@ -748,7 +759,7 @@ func wasmimport_TCPSocketStartBind(self0 uint32, network0 uint32, localAddress0
|
||||
// -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) StartConnect(network_ network.Network, remoteAddress network.IPSocketAddress) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) StartConnect(network_ network.Network, remoteAddress network.IPSocketAddress) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
network0 := cm.Reinterpret[uint32](network_)
|
||||
remoteAddress0, remoteAddress1, remoteAddress2, remoteAddress3, remoteAddress4, remoteAddress5, remoteAddress6, remoteAddress7, remoteAddress8, remoteAddress9, remoteAddress10, remoteAddress11 := lower_IPSocketAddress(remoteAddress)
|
||||
@@ -758,7 +769,7 @@ func (self TCPSocket) StartConnect(network_ network.Network, remoteAddress netwo
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.start-connect
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketStartConnect(self0 uint32, network0 uint32, remoteAddress0 uint32, remoteAddress1 uint32, remoteAddress2 uint32, remoteAddress3 uint32, remoteAddress4 uint32, remoteAddress5 uint32, remoteAddress6 uint32, remoteAddress7 uint32, remoteAddress8 uint32, remoteAddress9 uint32, remoteAddress10 uint32, remoteAddress11 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketStartConnect(self0 uint32, network0 uint32, remoteAddress0 uint32, remoteAddress1 uint32, remoteAddress2 uint32, remoteAddress3 uint32, remoteAddress4 uint32, remoteAddress5 uint32, remoteAddress6 uint32, remoteAddress7 uint32, remoteAddress8 uint32, remoteAddress9 uint32, remoteAddress10 uint32, remoteAddress11 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// StartListen represents the imported method "start-listen".
|
||||
//
|
||||
@@ -794,7 +805,7 @@ func wasmimport_TCPSocketStartConnect(self0 uint32, network0 uint32, remoteAddre
|
||||
// start-listen: func() -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self TCPSocket) StartListen() (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self TCPSocket) StartListen() (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_TCPSocketStartListen((uint32)(self0), &result)
|
||||
return
|
||||
@@ -802,7 +813,7 @@ func (self TCPSocket) StartListen() (result cm.ErrResult[struct{}, network.Error
|
||||
|
||||
//go:wasmimport wasi:sockets/tcp@0.2.0 [method]tcp-socket.start-listen
|
||||
//go:noescape
|
||||
func wasmimport_TCPSocketStartListen(self0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_TCPSocketStartListen(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
|
||||
@@ -43,7 +43,7 @@ import (
|
||||
// error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func CreateUDPSocket(addressFamily network.IPAddressFamily) (result cm.OKResult[udp.UDPSocket, network.ErrorCode]) {
|
||||
func CreateUDPSocket(addressFamily network.IPAddressFamily) (result cm.Result[udp.UDPSocket, udp.UDPSocket, network.ErrorCode]) {
|
||||
addressFamily0 := (uint32)(addressFamily)
|
||||
wasmimport_CreateUDPSocket((uint32)(addressFamily0), &result)
|
||||
return
|
||||
@@ -51,4 +51,4 @@ func CreateUDPSocket(addressFamily network.IPAddressFamily) (result cm.OKResult[
|
||||
|
||||
//go:wasmimport wasi:sockets/udp-create-socket@0.2.0 create-udp-socket
|
||||
//go:noescape
|
||||
func wasmimport_CreateUDPSocket(addressFamily0 uint32, result *cm.OKResult[udp.UDPSocket, network.ErrorCode])
|
||||
func wasmimport_CreateUDPSocket(addressFamily0 uint32, result *cm.Result[udp.UDPSocket, udp.UDPSocket, network.ErrorCode])
|
||||
|
||||
@@ -7,8 +7,14 @@ package udp
|
||||
import (
|
||||
"github.com/ydnar/wasm-tools-go/cm"
|
||||
"internal/wasi/sockets/v0.2.0/network"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// IPSocketAddressShape is used for storage in variant or result types.
|
||||
type IPSocketAddressShape struct {
|
||||
shape [unsafe.Sizeof(network.IPSocketAddress{})]byte
|
||||
}
|
||||
|
||||
func lower_IPv4Address(v network.IPv4Address) (f0 uint32, f1 uint32, f2 uint32, f3 uint32) {
|
||||
f0 = (uint32)(v[0])
|
||||
f1 = (uint32)(v[1])
|
||||
@@ -44,7 +50,7 @@ func lower_IPv6SocketAddress(v network.IPv6SocketAddress) (f0 uint32, f1 uint32,
|
||||
}
|
||||
|
||||
func lower_IPSocketAddress(v network.IPSocketAddress) (f0 uint32, f1 uint32, f2 uint32, f3 uint32, f4 uint32, f5 uint32, f6 uint32, f7 uint32, f8 uint32, f9 uint32, f10 uint32, f11 uint32) {
|
||||
f0 = (uint32)(cm.Tag(&v))
|
||||
f0 = (uint32)(v.Tag())
|
||||
switch f0 {
|
||||
case 0: // ipv4
|
||||
v1, v2, v3, v4, v5 := lower_IPv4SocketAddress(*v.IPv4())
|
||||
@@ -70,6 +76,11 @@ func lower_IPSocketAddress(v network.IPSocketAddress) (f0 uint32, f1 uint32, f2
|
||||
return
|
||||
}
|
||||
|
||||
// TupleIncomingDatagramStreamOutgoingDatagramStreamShape is used for storage in variant or result types.
|
||||
type TupleIncomingDatagramStreamOutgoingDatagramStreamShape struct {
|
||||
shape [unsafe.Sizeof(cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream]{})]byte
|
||||
}
|
||||
|
||||
func lower_OptionIPSocketAddress(v cm.Option[network.IPSocketAddress]) (f0 uint32, f1 uint32, f2 uint32, f3 uint32, f4 uint32, f5 uint32, f6 uint32, f7 uint32, f8 uint32, f9 uint32, f10 uint32, f11 uint32, f12 uint32) {
|
||||
some := v.Some()
|
||||
if some != nil {
|
||||
|
||||
@@ -105,7 +105,7 @@ func wasmimport_UDPSocketAddressFamily(self0 uint32) (result0 uint32)
|
||||
// finish-bind: func() -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) FinishBind() (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) FinishBind() (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketFinishBind((uint32)(self0), &result)
|
||||
return
|
||||
@@ -113,7 +113,7 @@ func (self UDPSocket) FinishBind() (result cm.ErrResult[struct{}, network.ErrorC
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.finish-bind
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// LocalAddress represents the imported method "local-address".
|
||||
//
|
||||
@@ -138,7 +138,7 @@ func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.ErrResult[struct{},
|
||||
// local-address: func() -> result<ip-socket-address, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) LocalAddress() (result cm.OKResult[network.IPSocketAddress, network.ErrorCode]) {
|
||||
func (self UDPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketLocalAddress((uint32)(self0), &result)
|
||||
return
|
||||
@@ -146,7 +146,7 @@ func (self UDPSocket) LocalAddress() (result cm.OKResult[network.IPSocketAddress
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.local-address
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.OKResult[network.IPSocketAddress, network.ErrorCode])
|
||||
func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
|
||||
|
||||
// ReceiveBufferSize represents the imported method "receive-buffer-size".
|
||||
//
|
||||
@@ -166,7 +166,7 @@ func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.OKResult[network.
|
||||
// receive-buffer-size: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) ReceiveBufferSize() (result cm.OKResult[uint64, network.ErrorCode]) {
|
||||
func (self UDPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketReceiveBufferSize((uint32)(self0), &result)
|
||||
return
|
||||
@@ -174,7 +174,7 @@ func (self UDPSocket) ReceiveBufferSize() (result cm.OKResult[uint64, network.Er
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.receive-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
|
||||
func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// RemoteAddress represents the imported method "remote-address".
|
||||
//
|
||||
@@ -192,7 +192,7 @@ func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.OKResult[uin
|
||||
// remote-address: func() -> result<ip-socket-address, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) RemoteAddress() (result cm.OKResult[network.IPSocketAddress, network.ErrorCode]) {
|
||||
func (self UDPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketRemoteAddress((uint32)(self0), &result)
|
||||
return
|
||||
@@ -200,14 +200,14 @@ func (self UDPSocket) RemoteAddress() (result cm.OKResult[network.IPSocketAddres
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.remote-address
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketRemoteAddress(self0 uint32, result *cm.OKResult[network.IPSocketAddress, network.ErrorCode])
|
||||
func wasmimport_UDPSocketRemoteAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
|
||||
|
||||
// SendBufferSize represents the imported method "send-buffer-size".
|
||||
//
|
||||
// send-buffer-size: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) SendBufferSize() (result cm.OKResult[uint64, network.ErrorCode]) {
|
||||
func (self UDPSocket) SendBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketSendBufferSize((uint32)(self0), &result)
|
||||
return
|
||||
@@ -215,14 +215,14 @@ func (self UDPSocket) SendBufferSize() (result cm.OKResult[uint64, network.Error
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.send-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketSendBufferSize(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
|
||||
func wasmimport_UDPSocketSendBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// SetReceiveBufferSize represents the imported method "set-receive-buffer-size".
|
||||
//
|
||||
// set-receive-buffer-size: func(value: u64) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_UDPSocketSetReceiveBufferSize((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -231,14 +231,14 @@ func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.ErrResult[st
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.set-receive-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_UDPSocketSetReceiveBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetSendBufferSize represents the imported method "set-send-buffer-size".
|
||||
//
|
||||
// set-send-buffer-size: func(value: u64) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_UDPSocketSetSendBufferSize((uint32)(self0), (uint64)(value0), &result)
|
||||
@@ -247,14 +247,14 @@ func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.ErrResult[struc
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.set-send-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_UDPSocketSetSendBufferSize(self0 uint32, value0 uint64, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// SetUnicastHopLimit represents the imported method "set-unicast-hop-limit".
|
||||
//
|
||||
// set-unicast-hop-limit: func(value: u8) -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint32)(value)
|
||||
wasmimport_UDPSocketSetUnicastHopLimit((uint32)(self0), (uint32)(value0), &result)
|
||||
@@ -263,7 +263,7 @@ func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.ErrResult[struc
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.set-unicast-hop-limit
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketSetUnicastHopLimit(self0 uint32, value0 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_UDPSocketSetUnicastHopLimit(self0 uint32, value0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// StartBind represents the imported method "start-bind".
|
||||
//
|
||||
@@ -303,7 +303,7 @@ func wasmimport_UDPSocketSetUnicastHopLimit(self0 uint32, value0 uint32, result
|
||||
// result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) StartBind(network_ network.Network, localAddress network.IPSocketAddress) (result cm.ErrResult[struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) StartBind(network_ network.Network, localAddress network.IPSocketAddress) (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
network0 := cm.Reinterpret[uint32](network_)
|
||||
localAddress0, localAddress1, localAddress2, localAddress3, localAddress4, localAddress5, localAddress6, localAddress7, localAddress8, localAddress9, localAddress10, localAddress11 := lower_IPSocketAddress(localAddress)
|
||||
@@ -313,7 +313,7 @@ func (self UDPSocket) StartBind(network_ network.Network, localAddress network.I
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.start-bind
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketStartBind(self0 uint32, network0 uint32, localAddress0 uint32, localAddress1 uint32, localAddress2 uint32, localAddress3 uint32, localAddress4 uint32, localAddress5 uint32, localAddress6 uint32, localAddress7 uint32, localAddress8 uint32, localAddress9 uint32, localAddress10 uint32, localAddress11 uint32, result *cm.ErrResult[struct{}, network.ErrorCode])
|
||||
func wasmimport_UDPSocketStartBind(self0 uint32, network0 uint32, localAddress0 uint32, localAddress1 uint32, localAddress2 uint32, localAddress3 uint32, localAddress4 uint32, localAddress5 uint32, localAddress6 uint32, localAddress7 uint32, localAddress8 uint32, localAddress9 uint32, localAddress10 uint32, localAddress11 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// Stream represents the imported method "stream".
|
||||
//
|
||||
@@ -372,7 +372,7 @@ func wasmimport_UDPSocketStartBind(self0 uint32, network0 uint32, localAddress0
|
||||
// outgoing-datagram-stream>, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) (result cm.OKResult[cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode]) {
|
||||
func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) (result cm.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
remoteAddress0, remoteAddress1, remoteAddress2, remoteAddress3, remoteAddress4, remoteAddress5, remoteAddress6, remoteAddress7, remoteAddress8, remoteAddress9, remoteAddress10, remoteAddress11, remoteAddress12 := lower_OptionIPSocketAddress(remoteAddress)
|
||||
wasmimport_UDPSocketStream((uint32)(self0), (uint32)(remoteAddress0), (uint32)(remoteAddress1), (uint32)(remoteAddress2), (uint32)(remoteAddress3), (uint32)(remoteAddress4), (uint32)(remoteAddress5), (uint32)(remoteAddress6), (uint32)(remoteAddress7), (uint32)(remoteAddress8), (uint32)(remoteAddress9), (uint32)(remoteAddress10), (uint32)(remoteAddress11), (uint32)(remoteAddress12), &result)
|
||||
@@ -381,7 +381,7 @@ func (self UDPSocket) Stream(remoteAddress cm.Option[network.IPSocketAddress]) (
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.stream
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketStream(self0 uint32, remoteAddress0 uint32, remoteAddress1 uint32, remoteAddress2 uint32, remoteAddress3 uint32, remoteAddress4 uint32, remoteAddress5 uint32, remoteAddress6 uint32, remoteAddress7 uint32, remoteAddress8 uint32, remoteAddress9 uint32, remoteAddress10 uint32, remoteAddress11 uint32, remoteAddress12 uint32, result *cm.OKResult[cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode])
|
||||
func wasmimport_UDPSocketStream(self0 uint32, remoteAddress0 uint32, remoteAddress1 uint32, remoteAddress2 uint32, remoteAddress3 uint32, remoteAddress4 uint32, remoteAddress5 uint32, remoteAddress6 uint32, remoteAddress7 uint32, remoteAddress8 uint32, remoteAddress9 uint32, remoteAddress10 uint32, remoteAddress11 uint32, remoteAddress12 uint32, result *cm.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
@@ -416,7 +416,7 @@ func wasmimport_UDPSocketSubscribe(self0 uint32) (result0 uint32)
|
||||
// unicast-hop-limit: func() -> result<u8, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) UnicastHopLimit() (result cm.OKResult[uint8, network.ErrorCode]) {
|
||||
func (self UDPSocket) UnicastHopLimit() (result cm.Result[uint8, uint8, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketUnicastHopLimit((uint32)(self0), &result)
|
||||
return
|
||||
@@ -424,7 +424,7 @@ func (self UDPSocket) UnicastHopLimit() (result cm.OKResult[uint8, network.Error
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.unicast-hop-limit
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketUnicastHopLimit(self0 uint32, result *cm.OKResult[uint8, network.ErrorCode])
|
||||
func wasmimport_UDPSocketUnicastHopLimit(self0 uint32, result *cm.Result[uint8, uint8, network.ErrorCode])
|
||||
|
||||
// IncomingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.0#incoming-datagram-stream".
|
||||
//
|
||||
@@ -477,7 +477,7 @@ func wasmimport_IncomingDatagramStreamResourceDrop(self0 uint32)
|
||||
// receive: func(max-results: u64) -> result<list<incoming-datagram>, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.OKResult[cm.List[IncomingDatagram], network.ErrorCode]) {
|
||||
func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
maxResults0 := (uint64)(maxResults)
|
||||
wasmimport_IncomingDatagramStreamReceive((uint32)(self0), (uint64)(maxResults0), &result)
|
||||
@@ -486,7 +486,7 @@ func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.OKResul
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]incoming-datagram-stream.receive
|
||||
//go:noescape
|
||||
func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64, result *cm.OKResult[cm.List[IncomingDatagram], network.ErrorCode])
|
||||
func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64, result *cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
@@ -546,7 +546,7 @@ func wasmimport_OutgoingDatagramStreamResourceDrop(self0 uint32)
|
||||
// check-send: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self OutgoingDatagramStream) CheckSend() (result cm.OKResult[uint64, network.ErrorCode]) {
|
||||
func (self OutgoingDatagramStream) CheckSend() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_OutgoingDatagramStreamCheckSend((uint32)(self0), &result)
|
||||
return
|
||||
@@ -554,7 +554,7 @@ func (self OutgoingDatagramStream) CheckSend() (result cm.OKResult[uint64, netwo
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.check-send
|
||||
//go:noescape
|
||||
func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.OKResult[uint64, network.ErrorCode])
|
||||
func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// Send represents the imported method "send".
|
||||
//
|
||||
@@ -610,7 +610,7 @@ func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.OKResul
|
||||
// send: func(datagrams: list<outgoing-datagram>) -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (result cm.OKResult[uint64, network.ErrorCode]) {
|
||||
func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
datagrams0, datagrams1 := cm.LowerList(datagrams)
|
||||
wasmimport_OutgoingDatagramStreamSend((uint32)(self0), (*OutgoingDatagram)(datagrams0), (uint32)(datagrams1), &result)
|
||||
@@ -619,7 +619,7 @@ func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (re
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.send
|
||||
//go:noescape
|
||||
func wasmimport_OutgoingDatagramStreamSend(self0 uint32, datagrams0 *OutgoingDatagram, datagrams1 uint32, result *cm.OKResult[uint64, network.ErrorCode])
|
||||
func wasmimport_OutgoingDatagramStreamSend(self0 uint32, datagrams0 *OutgoingDatagram, datagrams1 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user