@univerjs-pro/collaboration-client v0.5.0-beta.1 • Docs
Class: CollaborationSocketService
This service provides a socket that can be used to communicate with the remote collaboration server.
Extends
Implements
Constructors
new CollaborationSocketService()
new CollaborationSocketService(
_http,
_ws,
_configService,
_logService,
_snapshotServerService): CollaborationSocketService
Parameters
Parameter | Type |
---|---|
_http | HTTPService |
_ws | WebSocketService |
_configService | IConfigService |
_logService | ILogService |
_snapshotServerService | ISnapshotServerService |
Returns
Overrides
Defined in
packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:49
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_configService | readonly | IConfigService | undefined | - | packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:52 |
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_http | readonly | HTTPService | undefined | - | packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:50 |
_logService | readonly | ILogService | undefined | - | packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:53 |
_snapshotServerService | readonly | ISnapshotServerService | undefined | - | packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:54 |
_ws | readonly | WebSocketService | undefined | - | packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:51 |
Methods
_fetchMissChangesets()
protected _fetchMissChangesets(event): Promise<Changeset[]>
Parameters
Parameter | Type |
---|---|
event | IFetchingMissEvent |
Returns
Promise
<Changeset
[]>
Defined in
packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:172
_submitChangeset()
protected _submitChangeset(socket, event): Promise<void>
Parameters
Parameter | Type |
---|---|
socket | ICollaborationSocket |
event | ISubmitChangesetEvent |
Returns
Promise
<void
>
Defined in
packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:145
createSocket()
createSocket(URL): Nullable<ICollaborationSocket>
Create a socket that would connect to the remote collaboration server. It would throw an error when the socket cannot be created.
Parameters
Parameter | Type | Description |
---|---|---|
URL | string | The URL of the remote server. |
Returns
Nullable
<ICollaborationSocket
>
Implementation of
ICollaborationSocketService
.createSocket
Defined in
packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:64
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:106
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100