@univerjs/network v0.5.0-beta.1Docs


Interface: ISocket

An interface that represents a socket connection.

Properties

PropertyTypeDefined 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
URLstringsubmodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:36

Methods

close()

close(code?, reason?): void

Parameters

ParameterType
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

ParameterType
dataSocketBodyType

Returns

void

Defined in

submodules/univer/packages/network/src/services/web-socket/web-socket.service.ts:43