@univerjs-pro/collaboration-client v0.5.4
Class: CollaborationSocketService
Defined in: packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:48
This service provides a socket that can be used to communicate with the remote collaboration server.
Extends
Implements
Constructors
new CollaborationSocketService()
new CollaborationSocketService(
_injector,
_http,
_configService,
_logService,
_snapshotServerService): CollaborationSocketService
Defined in: packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:49
Parameters
Parameter | Type |
---|---|
_injector | Injector |
_http | HTTPService |
_configService | IConfigService |
_logService | ILogService |
_snapshotServerService | ISnapshotServerService |
Returns
Overrides
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:96 |
_http | readonly | HTTPService | undefined | - | packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:51 |
_injector | readonly | Injector | 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 |
Methods
_fetchMissChangesets()
protected _fetchMissChangesets(event): Promise<Changeset[]>
Defined in: packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:176
Parameters
Parameter | Type |
---|---|
event | IFetchingMissEvent |
Returns
Promise
<Changeset
[]>
_submitChangeset()
protected _submitChangeset(socket, event): Promise<void>
Defined in: packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:149
Parameters
Parameter | Type |
---|---|
socket | ICollaborationSocket |
event | ISubmitChangesetEvent |
Returns
Promise
<void
>
createSocket()
createSocket(URL): Nullable<ICollaborationSocket>
Defined in: packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:65
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
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void