|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Cooperation.CooperationServer</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Cooperation.CooperationServer</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the cooperation server. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#CooperationServer">CooperationServer</a></td> |
|
25 <td>Class implementing the cooperation server.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="CooperationServer" ID="CooperationServer"></a> |
|
36 <h2>CooperationServer</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the cooperation server. |
|
40 </p> |
|
41 <h3>Signals</h3> |
|
42 <dl> |
|
43 |
|
44 <dt>newConnection(connection)</dt> |
|
45 <dd> |
|
46 emitted after a new connection was |
|
47 received (Connection) |
|
48 </dd> |
|
49 </dl> |
|
50 <h3>Derived from</h3> |
|
51 QTcpServer |
|
52 <h3>Class Attributes</h3> |
|
53 |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Class Methods</h3> |
|
58 |
|
59 <table> |
|
60 <tr><td>None</td></tr> |
|
61 </table> |
|
62 <h3>Methods</h3> |
|
63 |
|
64 <table> |
|
65 |
|
66 <tr> |
|
67 <td><a href="#CooperationServer.__init__">CooperationServer</a></td> |
|
68 <td>Constructor</td> |
|
69 </tr> |
|
70 <tr> |
|
71 <td><a href="#CooperationServer.incomingConnection">incomingConnection</a></td> |
|
72 <td>Public method handling an incoming connection.</td> |
|
73 </tr> |
|
74 <tr> |
|
75 <td><a href="#CooperationServer.startListening">startListening</a></td> |
|
76 <td>Public method to start listening for new connections.</td> |
|
77 </tr> |
|
78 </table> |
|
79 <h3>Static Methods</h3> |
|
80 |
|
81 <table> |
|
82 <tr><td>None</td></tr> |
|
83 </table> |
|
84 |
|
85 <a NAME="CooperationServer.__init__" ID="CooperationServer.__init__"></a> |
|
86 <h4>CooperationServer (Constructor)</h4> |
|
87 <b>CooperationServer</b>(<i>address, parent=None</i>) |
|
88 |
|
89 <p> |
|
90 Constructor |
|
91 </p> |
|
92 <dl> |
|
93 |
|
94 <dt><i>address</i></dt> |
|
95 <dd> |
|
96 address the server should listen on (QHostAddress) |
|
97 </dd> |
|
98 <dt><i>parent</i></dt> |
|
99 <dd> |
|
100 reference to the parent object (QObject) |
|
101 </dd> |
|
102 </dl> |
|
103 <a NAME="CooperationServer.incomingConnection" ID="CooperationServer.incomingConnection"></a> |
|
104 <h4>CooperationServer.incomingConnection</h4> |
|
105 <b>incomingConnection</b>(<i>socketDescriptor</i>) |
|
106 |
|
107 <p> |
|
108 Public method handling an incoming connection. |
|
109 </p> |
|
110 <dl> |
|
111 |
|
112 <dt><i>socketDescriptor</i></dt> |
|
113 <dd> |
|
114 native socket descriptor (integer) |
|
115 </dd> |
|
116 </dl> |
|
117 <a NAME="CooperationServer.startListening" ID="CooperationServer.startListening"></a> |
|
118 <h4>CooperationServer.startListening</h4> |
|
119 <b>startListening</b>(<i>port=-1, findFreePort=False</i>) |
|
120 |
|
121 <p> |
|
122 Public method to start listening for new connections. |
|
123 </p> |
|
124 <dl> |
|
125 |
|
126 <dt><i>port</i></dt> |
|
127 <dd> |
|
128 port to listen on (integer) |
|
129 </dd> |
|
130 <dt><i>findFreePort</i></dt> |
|
131 <dd> |
|
132 flag indicating to search for a free port |
|
133 depending on the configuration (boolean) |
|
134 </dd> |
|
135 </dl> |
|
136 <dl> |
|
137 <dt>Return:</dt> |
|
138 <dd> |
|
139 tuple giving a flag indicating success (boolean) and |
|
140 the port the server listens on |
|
141 </dd> |
|
142 </dl> |
|
143 <div align="right"><a href="#top">Up</a></div> |
|
144 <hr /> |
|
145 </body></html> |