Add headers info when connecting to a web-socket server composed by the TGrid. The headers may include additional information like activation and web-socket server may decide whether to accept the connection or not by parsing the headers.
When the feature adding headers has been implemented, web-socket components WebConnector, WebAcceptor and WebServer would be changed like below. Also, this update may cause a critical change on the message protocol. Therefore, when the feature has been implemented, it can't be compatible with the previous versions.
export class WebConnector<Provider extends object>
{
public connect<Headers extends object>(url: string, headers?: Headers): Promise<void>;
}
export class WebAcceptor<Headers extends object, Provider extends object>
{
public get path(): string;
public get state(): string;
public get headers(): Headers;
}
export class WebServer<Provider extends object>
{
public open<Headers extends object>
(
port: number,
handler: (acceptor: WebAcceptor<Headers, Provider>) => any
): Promise<void>;
}
Add
headers
info when connecting to a web-socket server composed by the TGrid. Theheaders
may include additional information like activation and web-socket server may decide whether to accept the connection or not by parsing theheaders
.When the feature adding
headers
has been implemented, web-socket componentsWebConnector
,WebAcceptor
andWebServer
would be changed like below. Also, this update may cause a critical change on the message protocol. Therefore, when the feature has been implemented, it can't be compatible with the previous versions.