API Reference
@univerjs
@univerjs/network
classes
Websocketservice

@univerjs/network v0.4.2Docs


Class: WebSocketService

This service create a WebSocket connection to a remote server.

Extends

Implements

Constructors

new WebSocketService()

new WebSocketService(): WebSocketService

Returns

WebSocketService

Inherited from

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)

Methods

createSocket()

createSocket(URL): Nullable<ISocket>

Parameters

ParameterType
URLstring

Returns

Nullable<ISocket>

Implementation of

ISocketService.createSocket

Defined in

packages/network/src/services/web-socket/web-socket.service.ts:55 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.