// Definitions for Freedom messages passed around the app. declare module Messages { // Describes a transport. export interface TransportInfo { localAddress :string; localPort :number; remoteAddress :string; remotePort :number; // Name of transformer to use, e.g. 'rabbit' or 'none'. // TODO: perhaps this should be a name of a module to be require-d in? transformer :string; // Key for transformer, if any. key ?:ArrayBuffer; // JSON-encoded configuration, if any. config ?:string; } // Describes an endpoint, e.g. localhost:9999. // Used by the TURN relay's 'start' event and 'ready' events. export interface EndpointInfo { address :string; port :number; } // No-arg "notification-only" event. export interface Notification { } // Describes a message, which may have been received or is for sending. // Used by 'send' and 'message' events. export interface Message { data :ArrayBuffer; } }