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