ISocket interface
属性
is |
方法
close() | |
connect(string) | |
set |
|
set |
|
set |
|
write(INode |
属性详细信息
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