mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-10 06:29:32 +00:00
internal/{cm,wasi}: regenerate WASI 0.2 bindings with wasm-tools-go v0.3.0
This commit is contained in:
@@ -9,6 +9,31 @@ import (
|
||||
"internal/wasi/sockets/v0.2.0/network"
|
||||
)
|
||||
|
||||
// Pollable represents the imported type alias "wasi:sockets/udp@0.2.0#pollable".
|
||||
//
|
||||
// See [poll.Pollable] for more information.
|
||||
type Pollable = poll.Pollable
|
||||
|
||||
// Network represents the imported type alias "wasi:sockets/udp@0.2.0#network".
|
||||
//
|
||||
// See [network.Network] for more information.
|
||||
type Network = network.Network
|
||||
|
||||
// ErrorCode represents the type alias "wasi:sockets/udp@0.2.0#error-code".
|
||||
//
|
||||
// See [network.ErrorCode] for more information.
|
||||
type ErrorCode = network.ErrorCode
|
||||
|
||||
// IPSocketAddress represents the type alias "wasi:sockets/udp@0.2.0#ip-socket-address".
|
||||
//
|
||||
// See [network.IPSocketAddress] for more information.
|
||||
type IPSocketAddress = network.IPSocketAddress
|
||||
|
||||
// IPAddressFamily represents the type alias "wasi:sockets/udp@0.2.0#ip-address-family".
|
||||
//
|
||||
// See [network.IPAddressFamily] for more information.
|
||||
type IPAddressFamily = network.IPAddressFamily
|
||||
|
||||
// IncomingDatagram represents the record "wasi:sockets/udp@0.2.0#incoming-datagram".
|
||||
//
|
||||
// A received datagram.
|
||||
@@ -18,6 +43,7 @@ import (
|
||||
// remote-address: ip-socket-address,
|
||||
// }
|
||||
type IncomingDatagram struct {
|
||||
_ cm.HostLayout
|
||||
// The payload.
|
||||
//
|
||||
// Theoretical max size: ~64 KiB. In practice, typically less than 1500 bytes.
|
||||
@@ -29,7 +55,7 @@ type IncomingDatagram struct {
|
||||
// with, if any.
|
||||
//
|
||||
// Equivalent to the `src_addr` out parameter of `recvfrom`.
|
||||
RemoteAddress network.IPSocketAddress
|
||||
RemoteAddress IPSocketAddress
|
||||
}
|
||||
|
||||
// OutgoingDatagram represents the record "wasi:sockets/udp@0.2.0#outgoing-datagram".
|
||||
@@ -41,6 +67,7 @@ type IncomingDatagram struct {
|
||||
// remote-address: option<ip-socket-address>,
|
||||
// }
|
||||
type OutgoingDatagram struct {
|
||||
_ cm.HostLayout
|
||||
// The payload.
|
||||
Data cm.List[uint8]
|
||||
|
||||
@@ -53,7 +80,7 @@ type OutgoingDatagram struct {
|
||||
//
|
||||
// If this value is None, the send operation is equivalent to `send` in POSIX. Otherwise
|
||||
// it is equivalent to `sendto`.
|
||||
RemoteAddress cm.Option[network.IPSocketAddress]
|
||||
RemoteAddress cm.Option[IPSocketAddress]
|
||||
}
|
||||
|
||||
// UDPSocket represents the imported resource "wasi:sockets/udp@0.2.0#udp-socket".
|
||||
@@ -74,10 +101,6 @@ func (self UDPSocket) ResourceDrop() {
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [resource-drop]udp-socket
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketResourceDrop(self0 uint32)
|
||||
|
||||
// AddressFamily represents the imported method "address-family".
|
||||
//
|
||||
// Whether this is a IPv4 or IPv6 socket.
|
||||
@@ -87,32 +110,24 @@ func wasmimport_UDPSocketResourceDrop(self0 uint32)
|
||||
// address-family: func() -> ip-address-family
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) AddressFamily() (result network.IPAddressFamily) {
|
||||
func (self UDPSocket) AddressFamily() (result IPAddressFamily) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
result0 := wasmimport_UDPSocketAddressFamily((uint32)(self0))
|
||||
result = (network.IPAddressFamily)((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.address-family
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketAddressFamily(self0 uint32) (result0 uint32)
|
||||
|
||||
// FinishBind represents the imported method "finish-bind".
|
||||
//
|
||||
// finish-bind: func() -> result<_, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) FinishBind() (result cm.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) FinishBind() (result cm.Result[ErrorCode, struct{}, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketFinishBind((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.finish-bind
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// LocalAddress represents the imported method "local-address".
|
||||
//
|
||||
// Get the current bound address.
|
||||
@@ -136,16 +151,12 @@ func wasmimport_UDPSocketFinishBind(self0 uint32, result *cm.Result[network.Erro
|
||||
// local-address: func() -> result<ip-socket-address, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
|
||||
func (self UDPSocket) LocalAddress() (result cm.Result[IPSocketAddressShape, IPSocketAddress, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketLocalAddress((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.local-address
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode])
|
||||
|
||||
// ReceiveBufferSize represents the imported method "receive-buffer-size".
|
||||
//
|
||||
// The kernel buffer space reserved for sends/receives on this socket.
|
||||
@@ -164,16 +175,12 @@ func wasmimport_UDPSocketLocalAddress(self0 uint32, result *cm.Result[IPSocketAd
|
||||
// receive-buffer-size: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
func (self UDPSocket) ReceiveBufferSize() (result cm.Result[uint64, uint64, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketReceiveBufferSize((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.receive-buffer-size
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// RemoteAddress represents the imported method "remote-address".
|
||||
//
|
||||
// Get the address the socket is currently streaming to.
|
||||
@@ -190,79 +197,59 @@ func wasmimport_UDPSocketReceiveBufferSize(self0 uint32, result *cm.Result[uint6
|
||||
// remote-address: func() -> result<ip-socket-address, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, network.IPSocketAddress, network.ErrorCode]) {
|
||||
func (self UDPSocket) RemoteAddress() (result cm.Result[IPSocketAddressShape, IPSocketAddress, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketRemoteAddress((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.remote-address
|
||||
//go:noescape
|
||||
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.Result[uint64, uint64, network.ErrorCode]) {
|
||||
func (self UDPSocket) SendBufferSize() (result cm.Result[uint64, uint64, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketSendBufferSize((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.send-buffer-size
|
||||
//go:noescape
|
||||
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.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) SetReceiveBufferSize(value uint64) (result cm.Result[ErrorCode, struct{}, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_UDPSocketSetReceiveBufferSize((uint32)(self0), (uint64)(value0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//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.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.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) SetSendBufferSize(value uint64) (result cm.Result[ErrorCode, struct{}, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint64)(value)
|
||||
wasmimport_UDPSocketSetSendBufferSize((uint32)(self0), (uint64)(value0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//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.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.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) SetUnicastHopLimit(value uint8) (result cm.Result[ErrorCode, struct{}, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
value0 := (uint32)(value)
|
||||
wasmimport_UDPSocketSetUnicastHopLimit((uint32)(self0), (uint32)(value0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//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.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// StartBind represents the imported method "start-bind".
|
||||
//
|
||||
// Bind the socket to a specific network on the provided IP address and port.
|
||||
@@ -301,7 +288,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.Result[network.ErrorCode, struct{}, network.ErrorCode]) {
|
||||
func (self UDPSocket) StartBind(network_ Network, localAddress IPSocketAddress) (result cm.Result[ErrorCode, struct{}, 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)
|
||||
@@ -309,10 +296,6 @@ func (self UDPSocket) StartBind(network_ network.Network, localAddress network.I
|
||||
return
|
||||
}
|
||||
|
||||
//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.Result[network.ErrorCode, struct{}, network.ErrorCode])
|
||||
|
||||
// Stream represents the imported method "stream".
|
||||
//
|
||||
// Set up inbound & outbound communication channels, optionally to a specific peer.
|
||||
@@ -370,17 +353,13 @@ 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.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode]) {
|
||||
func (self UDPSocket) Stream(remoteAddress cm.Option[IPSocketAddress]) (result cm.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], 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)
|
||||
return
|
||||
}
|
||||
|
||||
//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.Result[TupleIncomingDatagramStreamOutgoingDatagramStreamShape, cm.Tuple[IncomingDatagramStream, OutgoingDatagramStream], network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
// Create a `pollable` which will resolve once the socket is ready for I/O.
|
||||
@@ -391,17 +370,13 @@ func wasmimport_UDPSocketStream(self0 uint32, remoteAddress0 uint32, remoteAddre
|
||||
// subscribe: func() -> pollable
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) Subscribe() (result poll.Pollable) {
|
||||
func (self UDPSocket) Subscribe() (result Pollable) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
result0 := wasmimport_UDPSocketSubscribe((uint32)(self0))
|
||||
result = cm.Reinterpret[poll.Pollable]((uint32)(result0))
|
||||
result = cm.Reinterpret[Pollable]((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.subscribe
|
||||
//go:noescape
|
||||
func wasmimport_UDPSocketSubscribe(self0 uint32) (result0 uint32)
|
||||
|
||||
// UnicastHopLimit represents the imported method "unicast-hop-limit".
|
||||
//
|
||||
// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options.
|
||||
@@ -414,16 +389,12 @@ func wasmimport_UDPSocketSubscribe(self0 uint32) (result0 uint32)
|
||||
// unicast-hop-limit: func() -> result<u8, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self UDPSocket) UnicastHopLimit() (result cm.Result[uint8, uint8, network.ErrorCode]) {
|
||||
func (self UDPSocket) UnicastHopLimit() (result cm.Result[uint8, uint8, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_UDPSocketUnicastHopLimit((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]udp-socket.unicast-hop-limit
|
||||
//go:noescape
|
||||
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".
|
||||
//
|
||||
// resource incoming-datagram-stream
|
||||
@@ -440,10 +411,6 @@ func (self IncomingDatagramStream) ResourceDrop() {
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [resource-drop]incoming-datagram-stream
|
||||
//go:noescape
|
||||
func wasmimport_IncomingDatagramStreamResourceDrop(self0 uint32)
|
||||
|
||||
// Receive represents the imported method "receive".
|
||||
//
|
||||
// Receive messages on the socket.
|
||||
@@ -475,17 +442,13 @@ 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.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode]) {
|
||||
func (self IncomingDatagramStream) Receive(maxResults uint64) (result cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
maxResults0 := (uint64)(maxResults)
|
||||
wasmimport_IncomingDatagramStreamReceive((uint32)(self0), (uint64)(maxResults0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]incoming-datagram-stream.receive
|
||||
//go:noescape
|
||||
func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64, result *cm.Result[cm.List[IncomingDatagram], cm.List[IncomingDatagram], network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
// Create a `pollable` which will resolve once the stream is ready to receive again.
|
||||
@@ -496,17 +459,13 @@ func wasmimport_IncomingDatagramStreamReceive(self0 uint32, maxResults0 uint64,
|
||||
// subscribe: func() -> pollable
|
||||
//
|
||||
//go:nosplit
|
||||
func (self IncomingDatagramStream) Subscribe() (result poll.Pollable) {
|
||||
func (self IncomingDatagramStream) Subscribe() (result Pollable) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
result0 := wasmimport_IncomingDatagramStreamSubscribe((uint32)(self0))
|
||||
result = cm.Reinterpret[poll.Pollable]((uint32)(result0))
|
||||
result = cm.Reinterpret[Pollable]((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]incoming-datagram-stream.subscribe
|
||||
//go:noescape
|
||||
func wasmimport_IncomingDatagramStreamSubscribe(self0 uint32) (result0 uint32)
|
||||
|
||||
// OutgoingDatagramStream represents the imported resource "wasi:sockets/udp@0.2.0#outgoing-datagram-stream".
|
||||
//
|
||||
// resource outgoing-datagram-stream
|
||||
@@ -523,10 +482,6 @@ func (self OutgoingDatagramStream) ResourceDrop() {
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [resource-drop]outgoing-datagram-stream
|
||||
//go:noescape
|
||||
func wasmimport_OutgoingDatagramStreamResourceDrop(self0 uint32)
|
||||
|
||||
// CheckSend represents the imported method "check-send".
|
||||
//
|
||||
// Check readiness for sending. This function never blocks.
|
||||
@@ -544,16 +499,12 @@ func wasmimport_OutgoingDatagramStreamResourceDrop(self0 uint32)
|
||||
// check-send: func() -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self OutgoingDatagramStream) CheckSend() (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
func (self OutgoingDatagramStream) CheckSend() (result cm.Result[uint64, uint64, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
wasmimport_OutgoingDatagramStreamCheckSend((uint32)(self0), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.check-send
|
||||
//go:noescape
|
||||
func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// Send represents the imported method "send".
|
||||
//
|
||||
// Send messages on the socket.
|
||||
@@ -608,17 +559,13 @@ func wasmimport_OutgoingDatagramStreamCheckSend(self0 uint32, result *cm.Result[
|
||||
// send: func(datagrams: list<outgoing-datagram>) -> result<u64, error-code>
|
||||
//
|
||||
//go:nosplit
|
||||
func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (result cm.Result[uint64, uint64, network.ErrorCode]) {
|
||||
func (self OutgoingDatagramStream) Send(datagrams cm.List[OutgoingDatagram]) (result cm.Result[uint64, uint64, ErrorCode]) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
datagrams0, datagrams1 := cm.LowerList(datagrams)
|
||||
wasmimport_OutgoingDatagramStreamSend((uint32)(self0), (*OutgoingDatagram)(datagrams0), (uint32)(datagrams1), &result)
|
||||
return
|
||||
}
|
||||
|
||||
//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.Result[uint64, uint64, network.ErrorCode])
|
||||
|
||||
// Subscribe represents the imported method "subscribe".
|
||||
//
|
||||
// Create a `pollable` which will resolve once the stream is ready to send again.
|
||||
@@ -629,13 +576,9 @@ func wasmimport_OutgoingDatagramStreamSend(self0 uint32, datagrams0 *OutgoingDat
|
||||
// subscribe: func() -> pollable
|
||||
//
|
||||
//go:nosplit
|
||||
func (self OutgoingDatagramStream) Subscribe() (result poll.Pollable) {
|
||||
func (self OutgoingDatagramStream) Subscribe() (result Pollable) {
|
||||
self0 := cm.Reinterpret[uint32](self)
|
||||
result0 := wasmimport_OutgoingDatagramStreamSubscribe((uint32)(self0))
|
||||
result = cm.Reinterpret[poll.Pollable]((uint32)(result0))
|
||||
result = cm.Reinterpret[Pollable]((uint32)(result0))
|
||||
return
|
||||
}
|
||||
|
||||
//go:wasmimport wasi:sockets/udp@0.2.0 [method]outgoing-datagram-stream.subscribe
|
||||
//go:noescape
|
||||
func wasmimport_OutgoingDatagramStreamSubscribe(self0 uint32) (result0 uint32)
|
||||
|
||||
Reference in New Issue
Block a user