Module websocket

Source
Expand description

Types for the WebSocket API. Types for the websocket server.

Structs§

ApiError
An error.
ClientMetrics
ClientMetrics contains information regarding the state of the peer.
FailureWebSocketResponse
Unsuccessful Websocket response.
IceServer
Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer
LoggableApiError
An error with an internal message for logging.
ModelingBatch
A sequence of modeling requests. If any request fails, following requests will not be tried.
ModelingCmdReq
A graphics command submitted to the KittyCAD engine via the Modeling API.
ModelingSessionData
Successful Websocket response.
RawFile
A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json.
RtcIceCandidate
ICECandidate represents a ice candidate
RtcIceCandidateInit
ICECandidateInit is used to serialize ice candidates
RtcSessionDescription
SessionDescription is used to expose local and remote session descriptions.
SuccessWebSocketResponse
Successful Websocket response.

Enums§

BatchResponse
Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.
ErrorCode
The type of error sent by the KittyCAD API.
OkWebSocketResponseData
The websocket messages this server sends.
RtcIceCandidateType
ICECandidateType represents the type of the ICE candidate used.
RtcIceProtocol
ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.
RtcSdpType
SDPType describes the type of an SessionDescription.
SnakeCaseResult
Serde serializes Result into JSON as “Ok” and “Err”, but we want “ok” and “err”. So, create a new enum that serializes as lowercase.
WebSocketRequest
The websocket messages the server receives.
WebSocketResponse
Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.