import {Ice} from 'ice'; import '../Ice/Version'; import '../Ice/BuiltinSequences'; import '../Ice/EndpointF'; declare module './Ice.ns' { namespace Ice { /** * Uniquely identifies TCP endpoints. */ const TCPEndpointType: number; /** * Uniquely identifies SSL endpoints. */ const SSLEndpointType: number; /** * Uniquely identifies UDP endpoints. */ const UDPEndpointType: number; /** * Uniquely identifies TCP-based WebSocket endpoints. */ const WSEndpointType: number; /** * Uniquely identifies SSL-based WebSocket endpoints. */ const WSSEndpointType: number; /** * Uniquely identifies Bluetooth endpoints. */ const BTEndpointType: number; /** * Uniquely identifies SSL Bluetooth endpoints. */ const BTSEndpointType: number; /** * Uniquely identifies iAP-based endpoints. */ const iAPEndpointType: number; /** * Uniquely identifies SSL iAP-based endpoints. */ const iAPSEndpointType: number; /** * Base class providing access to the endpoint details. */ class EndpointInfo { constructor( underlying?: EndpointInfo | null, timeout?: number, compress?: boolean, ); /** * The information of the underyling endpoint of null if there's * no underlying endpoint. */ underlying: EndpointInfo | null; /** * The timeout for the endpoint in milliseconds. 0 means * non-blocking, -1 means no timeout. */ timeout: number; compress: boolean; /** * Returns the type of the endpoint. * * @return The endpoint type. */ type(): number; /** * Returns true if this endpoint is a datagram endpoint. * * @return True for a datagram endpoint. */ datagram(): boolean; /** * Returns true if this endpoint is a secure endpoint. * * @return True for a secure endpoint. */ secure(): boolean; } /** * The user-level interface to an endpoint. */ interface Endpoint { /** * Return a string representation of the endpoint. * * @return The string representation of the endpoint. */ toString(): string; /** * Returns the endpoint information. * * @return The endpoint information class. */ getInfo(): EndpointInfo | null; } /** * Provides access to the address details of a IP endpoint. * * @see Endpoint */ class IPEndpointInfo extends EndpointInfo { constructor( underlying?: EndpointInfo | null, timeout?: number, compress?: boolean, host?: string, port?: number, sourceAddress?: string, ); /** * The host or address configured with the endpoint. */ host: string; /** * The port number. */ port: number; sourceAddress: string; } /** * Provides access to a TCP endpoint information. * * @see Endpoint */ class TCPEndpointInfo extends IPEndpointInfo {} /** * Provides access to an UDP endpoint information. * * @see Endpoint */ class UDPEndpointInfo extends IPEndpointInfo { constructor( underlying?: EndpointInfo | null, timeout?: number, compress?: boolean, host?: string, port?: number, sourceAddress?: string, mcastInterface?: string, mcastTtl?: number, ); /** * The multicast interface. */ mcastInterface: string; /** * The multicast time-to-live (or hops). */ mcastTtl: number; } /** * Provides access to a WebSocket endpoint information. */ class WSEndpointInfo extends EndpointInfo { constructor( underlying?: EndpointInfo | null, timeout?: number, compress?: boolean, resource?: string, ); /** * The URI configured with the endpoint. */ resource: string; } /** * Provides access to the details of an opaque endpoint. * * @see Endpoint */ class OpaqueEndpointInfo extends EndpointInfo { constructor( underlying?: EndpointInfo | null, timeout?: number, compress?: boolean, rawEncoding?: Ice.EncodingVersion, rawBytes?: Ice.ByteSeq, ); /** * The encoding version of the opaque endpoint (to decode or * encode the rawBytes). */ rawEncoding: Ice.EncodingVersion; /** * The raw encoding of the opaque endpoint. */ rawBytes: Ice.ByteSeq; } } } export {Ice} from './Ice.ns';