udpSocket

Bun

Symbol

udpSocket

function udpSocket<DataBinaryType extends keyof BinaryTypeList = 'buffer'>(options: SocketOptions<DataBinaryType>): Promise<Socket<DataBinaryType>>

Create a UDP socket

@param options

The options to use when creating the server

function udpSocket<DataBinaryType extends keyof BinaryTypeList = 'buffer'>(options: ConnectSocketOptions<DataBinaryType>): Promise<ConnectedSocket<DataBinaryType>>

Create a UDP socket

@param options

The options to use when creating the server

Referenced types

interface SocketOptions<DataBinaryType extends BinaryType>

interface Socket<DataBinaryType extends BinaryType>

interface ConnectSocketOptions<DataBinaryType extends BinaryType>

interface ConnectedSocket<DataBinaryType extends BinaryType>