wasm-nats-stream-client/gen/wasi/sockets/udp-create-socket/udp-create-socket.wit.go

43 lines
1.5 KiB
Go
Raw Normal View History

2024-12-14 00:30:44 +00:00
// Code generated by wit-bindgen-go. DO NOT EDIT.
// Package udpcreatesocket represents the imported interface "wasi:sockets/udp-create-socket@0.2.0".
package udpcreatesocket
import (
2024-12-14 00:56:22 +00:00
"gitea.rebus.ninja/lore/wasm-nats-stream-client/gen/wasi/sockets/network"
"gitea.rebus.ninja/lore/wasm-nats-stream-client/gen/wasi/sockets/udp"
2024-12-14 00:30:44 +00:00
"github.com/bytecodealliance/wasm-tools-go/cm"
)
// Network represents the imported type alias "wasi:sockets/udp-create-socket@0.2.0#network".
//
// See [network.Network] for more information.
type Network = network.Network
// ErrorCode represents the type alias "wasi:sockets/udp-create-socket@0.2.0#error-code".
//
// See [network.ErrorCode] for more information.
type ErrorCode = network.ErrorCode
// IPAddressFamily represents the type alias "wasi:sockets/udp-create-socket@0.2.0#ip-address-family".
//
// See [network.IPAddressFamily] for more information.
type IPAddressFamily = network.IPAddressFamily
// UDPSocket represents the imported type alias "wasi:sockets/udp-create-socket@0.2.0#udp-socket".
//
// See [udp.UDPSocket] for more information.
type UDPSocket = udp.UDPSocket
// CreateUDPSocket represents the imported function "create-udp-socket".
//
// create-udp-socket: func(address-family: ip-address-family) -> result<udp-socket,
// error-code>
//
//go:nosplit
func CreateUDPSocket(addressFamily IPAddressFamily) (result cm.Result[UDPSocket, UDPSocket, ErrorCode]) {
addressFamily0 := (uint32)(addressFamily)
wasmimport_CreateUDPSocket((uint32)(addressFamily0), &result)
return
}