@pureweb/platform-streaming-agent
Version:
The PureWeb platform streaming agent enables your game to communicate and stream through the PureWeb Platform
15 lines (14 loc) • 992 B
TypeScript
import { ServerUnaryCall, sendUnaryData, ServerWritableStream } from '@grpc/grpc-js';
import { IMessagingServer } from './proto/sidecar_grpc_pb';
import { BroadcastMessage, SendBroadcastMessageResponse, PrivateMessage, SendDirectMessageResponse, MessagingSubscription, IncomingMessage } from './proto/sidecar_pb';
import { ILocalAgent } from '@pureweb/platform-sdk';
export declare class MessagingServer implements IMessagingServer {
private readonly agent;
constructor(agent: ILocalAgent);
sendBroadcastMessage(call: ServerUnaryCall<BroadcastMessage, SendBroadcastMessageResponse>, callback: sendUnaryData<SendBroadcastMessageResponse>): void;
sendDirectMessage(call: ServerUnaryCall<PrivateMessage, SendDirectMessageResponse>, callback: sendUnaryData<SendDirectMessageResponse>): void;
subscribe(call: ServerWritableStream<MessagingSubscription, IncomingMessage>): void;
private handlePrivateMessage;
private handleBroadcastMessage;
private handleMessage;
}