Bun

interface

udp.SocketHandler

interface SocketHandler<DataBinaryType extends BinaryType>

  • socket: Socket<DataBinaryType>,
    data: BinaryTypeList[DataBinaryType],
    port: number,
    address: string
    ): void | Promise<void>;
  • socket: Socket<DataBinaryType>
    ): void | Promise<void>;
  • socket: Socket<DataBinaryType>,
    error: Error
    ): void | Promise<void>;