DefinitelyTyped/types/hyco-ws/index.d.ts
Nathan Shively-Sanders f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00

28 lines
1.3 KiB
TypeScript

// Type definitions for hyco-ws 1.0
// Project: https://github.com/Azure/azure-relay-node, https://docs.microsoft.com/en-us/azure/service-bus-relay
// Definitions by: Manuel Rodrigo Cabello <https://github.com/mrcabellom>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as WebSocket from 'ws';
export class HybridConnectionWebSocketServer extends NodeJS.EventEmitter {
constructor(options: any);
close(callback: () => void): void;
listenUri: string;
closeRequested: boolean;
options: any;
path: string;
clients: WebSocket[];
controlChannel: WebSocket;
}
export function createRelayedServer(options: any, fn: (ws: WebSocket) => void): HybridConnectionWebSocketServer;
export function relayedConnect(address: string, fn: () => void): WebSocket;
export function createRelayToken(uri: string, key_name: string, key: string, expiry?: number): string;
export function appendRelayToken(uri: string, key_name: string, key: string, expiry?: number): string;
export function createRelayBaseUri(serviceBusNamespace: string, path: string): string;
export function createRelaySendUri(serviceBusNamespace: string, path: string, token?: any, id?: any): string;
export function createRelayListenUri(serviceBusNamespace: string, path: string, token?: any, id?: any): string;