@univerjs-pro/collaboration-client v0.5.0-beta.1Docs


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

ParameterType
_httpHTTPService
_wsWebSocketService
_configServiceIConfigService
_logServiceILogService
_snapshotServerServiceISnapshotServerService

Returns

CollaborationSocketService

Overrides

Disposable.constructor

Defined in

packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:49

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:93
_httpreadonlyHTTPServiceundefined-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
_wsreadonlyWebSocketServiceundefined-packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:51

Methods

_fetchMissChangesets()

protected _fetchMissChangesets(event): Promise<Changeset[]>

Parameters

ParameterType
eventIFetchingMissEvent

Returns

Promise<Changeset[]>

Defined in

packages/collaboration-client/src/services/socket/collaboration-socket.service.ts:172


_submitChangeset()

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

Parameters

ParameterType
socketICollaborationSocket
eventISubmitChangesetEvent

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

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

Disposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100