@univerjs/network v0.5.0-beta.1 • Docs
Interface: ISocket
An interface that represents a socket connection.
Properties
Property | Type | Defined in |
---|---|---|
close$ | Observable <CloseEvent > | submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:45 |
error$ | Observable <Event > | submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:46 |
message$ | Observable <MessageEvent <any >> | submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:47 |
open$ | Observable <Event > | submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:48 |
URL | string | submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:36 |
Methods
close()
close(code?, reason?): void
Parameters
Parameter | Type |
---|---|
code ? | number |
reason ? | string |
Returns
void
Defined in
submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:38
send()
send(data): void
Send a message to the remote server.
Parameters
Parameter | Type |
---|---|
data | SocketBodyType |
Returns
void
Defined in
submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:43