@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

ParameterType
_injectorInjector
_httpHTTPService
_configServiceIConfigService
_logServiceILogService
_snapshotServerServiceISnapshotServerService

Returns

CollaborationSocketService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_configServicereadonlyIConfigServiceundefined-packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:52
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
_httpreadonlyHTTPServiceundefined-packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:51
_injectorreadonlyInjectorundefined-packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:50
_logServicereadonlyILogServiceundefined-packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:53
_snapshotServerServicereadonlyISnapshotServerServiceundefined-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

ParameterType
eventIFetchingMissEvent

Returns

Promise<Changeset[]>


_submitChangeset()

protected _submitChangeset(socket, event): Promise<void>

Defined in: packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:149

Parameters

ParameterType
socketICollaborationSocket
eventISubmitChangesetEvent

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

ParameterTypeDescription
URLstringThe 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

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed