import { WebCommunicator } from "../communicator/WebCommunicator"; import { IClientDriver } from "../IClientDriver"; import { IProtocol } from "../../invoke/IProtocol"; /** * Communicator with remote web-client. * * {@link WebClientDriver} is a class taking full charge of network communication with remote client who follows * Web-socket protocol. This {@link WebClientDriver} object is always created by {@link WebServer} class. When you * got this {@link WebClientDriver} object from the {@link WebServer.addClient WebServer.addClient()}, then specify * {@link IProtocol listener} with the {@link WebClientDriver.listen WebClientDriver.listen()} method. * * Unlike other protocol, Web-socket protocol's clients notify two parameters on their connection; * {@link getSessionID session-id} and {@link getPath path}. The {@link getSessionID session-id} can be used to * identify *user* of each client, and the {@link getPath path} can be used which type of *service* that client wants. * In {@link service} module, you can see the best utilization case of them. * - {@link service.User}: utlization of the {@link getSessionID session-id}. * - {@link service.Service}: utilization of the {@link getPath path}. * * #### [Inherited] {@link IClientDriver} * @copydoc IClientDriver */ export declare class WebClientDriver extends WebCommunicator implements IClientDriver { /** * @hidden */ private path_; /** * @hidden */ private session_id_; /** * @hidden */ private listening_; /** * Initialization Constructor. * * @param connection Connection driver, a socket for web-socket. * @param path Requested path. * @param session_id Session ID, an identifier of the remote client. */ constructor(connection: any, path: string, session_id: string); /** * @inheritdoc */ listen(listener: IProtocol): void; /** * Get requested path. */ getPath(): string; /** * Get session ID, an identifier of the remote client. */ getSessionID(): string; }