summaryrefslogtreecommitdiff
path: root/cpp/slice/Ice/Connection.ice
blob: 628463ad0a012e832c5c83d7ed0a5a9d04e4a850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// **********************************************************************
//
// Copyright (c) 2001
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#ifndef ICE_CONNECTION_ICE
#define ICE_CONNECTION_ICE

module Ice
{

/**
 *
 * An Internet address, consisting of host and port information.
 *
 **/
local struct InternetAddress
{
    /** The "host" part of the Internet address **/
    string host;
    
    /** The port number part of the Internet address **/
    int port;
};

/**
 *
 * Base interface for querying specific information about particular
 * protocols.
 *
 **/
local interface ProtocolInfo
{
    /**
     *
     * Get the name of the protocol. For example, "tcp", "udp", or
     * "ssl".
     *
     * @return the name of the protocol.
     *
     **/
    string name();
};

/**
 *
 * Specific information about the TCP protocol.
 *
 **/
local interface TcpProtocolInfo extends ProtocolInfo
{
    // No entry yet
};

/**
 *
 * Specific information about the UDP protocol.
 *
 **/
local interface UdpProtocolInfo extends ProtocolInfo
{
    // No entry yet
};

/**
 *
 * Specific information about the SSL protocol.
 *
 **/
local interface SslProtocolInfo extends ProtocolInfo
{
    // No entry yet
};

/**
 *
 * A base interface providing generic information about Internet
 * connections.
 *
 * @see IncomingConnection
 * @see OutgoingConnection
 *
 **/
local interface Connection
{
    /**
     *
     * Get the local Internet address of the connection.
     *
     * @return The local Internet address.
     *
     **/
    InternetAddress getLocalAddress();

    /**
     *
     * Get the remote Internet address of the connection.
     *
     * @return The remote Internet address.
     *
     **/
    InternetAddress getRemoteAddress();

    /**
     *
     * Get protocol specific information.
     *
     * @return Protocol specific information.
     *
     **/
    ProtocolInfo getProtocolInfo();
};

/**
 *
 * A specialization of [Connection] for incoming connections accpeted
 * by a server.
 *
 * @see OutgoingConnection
 *
 **/
local interface IncomingConnection extends Connection
{
};

/**
 *
 * A specialization of [Connection] for outgoing connections
 * established by a client.
 *
 * @see IncomingConnection
 *
 **/
local interface OutgoingConnection extends Connection
{
    /**
     *
     * Flush all batched requests for the connection.
     *
     **/
    void flush();
};

};

#endif