共用方式為


ISocket interface

屬性

isConnected

方法

close()
connect(string)
setOnCloseHandler((x: any) => void)
setOnErrorHandler((x: any) => void)
setOnMessageHandler((x: any) => void)
write(INodeBuffer)

屬性詳細資料

isConnected

isConnected: boolean

屬性值

boolean

方法詳細資料

close()

function close(): any

傳回

any

connect(string)

function connect(serverAddress: string): Promise<void>

參數

serverAddress

string

傳回

Promise<void>

setOnCloseHandler((x: any) => void)

function setOnCloseHandler(handler: (x: any) => void): any

參數

handler

(x: any) => void

傳回

any

setOnErrorHandler((x: any) => void)

function setOnErrorHandler(handler: (x: any) => void): any

參數

handler

(x: any) => void

傳回

any

setOnMessageHandler((x: any) => void)

function setOnMessageHandler(handler: (x: any) => void): any

參數

handler

(x: any) => void

傳回

any

write(INodeBuffer)

function write(buffer: INodeBuffer): any

參數

buffer
INodeBuffer

傳回

any