class Socket
extends EventEmitter
import { Socket } from "https://deno.land/std@0.124.0/node/dgram.ts";
Constructors
new
Socket(_type: SocketType | SocketOption, _listener?: (msg: Buffer, rinfo: RemoteInfo) => void)Methods
addListener(event: "close", listener: () => void): this
addListener(event: "connect", listener: () => void): this
addListener(event: "error", listener: (err: Error) => void): this
addListener(event: "listening", listener: () => void): this
addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this
addMembership(_multicastAddress: string, _interfaceAddress?: string): void
address(): AddressInfo
addSourceSpecificMembership(): void
_sourceAddress: string,
_groupAddress: string,
_interfaceAddress?: string,
bind(): this
port?: number,
address?: string,
callback?: () => void,
bind(port: number, callback?: () => void): this
bind(callback: () => void): this
bind(options: BindOptions, callback?: () => void): this
close(_callback?: () => void): this
connect(): void
port: number,
address?: string,
callback?: () => void,
connect(port: number, callback: () => void): void
disconnect(): void
dropMembership(_multicastAddress: string, _interfaceAddress?: string): void
dropSourceSpecificMembership(): void
_sourceAddress: string,
_groupAddress: string,
_interfaceAddress?: string,
emit(event: "close"): boolean
emit(event: "connect"): boolean
emit(event: "error", err: Error): boolean
emit(event: "listening"): boolean
getRecvBufferSize(): number
getSendBufferSize(): number
on(event: "close", listener: () => void): this
on(event: "connect", listener: () => void): this
on(event: "error", listener: (err: Error) => void): this
on(event: "listening", listener: () => void): this
once(event: "close", listener: () => void): this
once(event: "connect", listener: () => void): this
once(event: "error", listener: (err: Error) => void): this
once(event: "listening", listener: () => void): this
prependListener(event: "close", listener: () => void): this
prependListener(event: "connect", listener: () => void): this
prependListener(event: "error", listener: (err: Error) => void): this
prependListener(event: "listening", listener: () => void): this
prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this
prependOnceListener(event: "close", listener: () => void): this
prependOnceListener(event: "connect", listener: () => void): this
prependOnceListener(event: "error", listener: (err: Error) => void): this
prependOnceListener(event: "listening", listener: () => void): this
prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this
ref(): this
remoteAddress(): AddressInfo
send(): void
msg: MessageType | ReadonlyArray<MessageType>,
port?: number,
address?: string,
callback?: (error: Error | null, bytes: number) => void,
send(): void
msg: MessageType | ReadonlyArray<MessageType>,
port?: number,
callback?: (error: Error | null, bytes: number) => void,
send(msg: MessageType | ReadonlyArray<MessageType>, callback?: (error: Error | null, bytes: number) => void): void
send(): void
msg: MessageType,
offset: number,
length: number,
port?: number,
address?: string,
callback?: (error: Error | null, bytes: number) => void,
send(): void
msg: MessageType,
offset: number,
length: number,
port?: number,
callback?: (error: Error | null, bytes: number) => void,
send(): void
msg: MessageType,
offset: number,
length: number,
callback?: (error: Error | null, bytes: number) => void,
setBroadcast(_arg: boolean): void
setMulticastInterface(_interfaceAddress: string): void
setMulticastLoopback(_arg: boolean): void
setMulticastTTL(_ttl: number): void
setRecvBufferSize(_size: number): void
setSendBufferSize(_size: number): void
setTTL(_ttl: number): void
unref(): this