Documentation/Source/eric6.Toolbox.SingleApplication.html

changeset 6632
084880ed940c
parent 3673
e26d7d0c1088
equal deleted inserted replaced
6631:0a2f0feac79d 6632:084880ed940c
93 <dd> 93 <dd>
94 name of the local server to connect to (string) 94 name of the local server to connect to (string)
95 </dd> 95 </dd>
96 </dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a> 96 </dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a>
97 <h4>SingleApplicationClient.connect</h4> 97 <h4>SingleApplicationClient.connect</h4>
98 <b>connect</b>(<i></i>) 98 <b>connect</b>(<i>timeout=10000</i>)
99 <p> 99 <p>
100 Public method to connect the single application client to its server. 100 Public method to connect the single application client to its server.
101 </p><dl> 101 </p><dl>
102 <dt><i>timeout</i> (int)</dt>
103 <dd>
104 connection timeout value in milliseconds
105 </dd>
106 </dl><dl>
102 <dt>Returns:</dt> 107 <dt>Returns:</dt>
103 <dd> 108 <dd>
104 value indicating success or an error number. Value is one of: 109 value indicating success or an error number. Value is one of:
105 <table> 110 <table>
106 <tr><td>0</td><td>No application is running</td></tr> 111 <tr><td>0</td><td>No application is running</td></tr>
140 raised to indicate that this method must be 145 raised to indicate that this method must be
141 implemented by a subclass 146 implemented by a subclass
142 </dd> 147 </dd>
143 </dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a> 148 </dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a>
144 <h4>SingleApplicationClient.sendCommand</h4> 149 <h4>SingleApplicationClient.sendCommand</h4>
145 <b>sendCommand</b>(<i>cmd</i>) 150 <b>sendCommand</b>(<i>command, arguments</i>)
146 <p> 151 <p>
147 Public method to send the command to the application server. 152 Public method to send the command to the application server.
148 </p><dl> 153 </p><dl>
149 <dt><i>cmd</i></dt> 154 <dt><i>command</i> (str)</dt>
150 <dd> 155 <dd>
151 command to be sent (string) 156 command to be sent to the server
157 </dd><dt><i>arguments</i> (list of str)</dt>
158 <dd>
159 list of command arguments
152 </dd> 160 </dd>
153 </dl> 161 </dl>
154 <div align="right"><a href="#top">Up</a></div> 162 <div align="right"><a href="#top">Up</a></div>
155 <hr /><hr /> 163 <hr /><hr />
156 <a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a> 164 <a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a>
178 <td>Private method to handle the closure of the socket.</td> 186 <td>Private method to handle the closure of the socket.</td>
179 </tr><tr> 187 </tr><tr>
180 <td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td> 188 <td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td>
181 <td>Private slot to handle a new connection.</td> 189 <td>Private slot to handle a new connection.</td>
182 </tr><tr> 190 </tr><tr>
183 <td><a href="#SingleApplicationServer.__parseLine">__parseLine</a></td> 191 <td><a href="#SingleApplicationServer.__receiveJson">__receiveJson</a></td>
184 <td>Private method to handle data from the client.</td> 192 <td>Private method to receive the data from the client.</td>
185 </tr><tr> 193 </tr><tr>
186 <td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td> 194 <td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td>
187 <td>Public slot to handle the command sent by the client.</td> 195 <td>Public slot to handle the command sent by the client.</td>
188 </tr><tr> 196 </tr><tr>
189 <td><a href="#SingleApplicationServer.shutdown">shutdown</a></td> 197 <td><a href="#SingleApplicationServer.shutdown">shutdown</a></td>
212 </p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a> 220 </p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a>
213 <h4>SingleApplicationServer.__newConnection</h4> 221 <h4>SingleApplicationServer.__newConnection</h4>
214 <b>__newConnection</b>(<i></i>) 222 <b>__newConnection</b>(<i></i>)
215 <p> 223 <p>
216 Private slot to handle a new connection. 224 Private slot to handle a new connection.
217 </p><a NAME="SingleApplicationServer.__parseLine" ID="SingleApplicationServer.__parseLine"></a> 225 </p><a NAME="SingleApplicationServer.__receiveJson" ID="SingleApplicationServer.__receiveJson"></a>
218 <h4>SingleApplicationServer.__parseLine</h4> 226 <h4>SingleApplicationServer.__receiveJson</h4>
219 <b>__parseLine</b>(<i></i>) 227 <b>__receiveJson</b>(<i></i>)
220 <p> 228 <p>
221 Private method to handle data from the client. 229 Private method to receive the data from the client.
222 </p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a> 230 </p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a>
223 <h4>SingleApplicationServer.handleCommand</h4> 231 <h4>SingleApplicationServer.handleCommand</h4>
224 <b>handleCommand</b>(<i>cmd, params</i>) 232 <b>handleCommand</b>(<i>command, arguments</i>)
225 <p> 233 <p>
226 Public slot to handle the command sent by the client. 234 Public slot to handle the command sent by the client.
227 </p><p> 235 </p><p>
228 <b>Note</b>: This method must be overridden by subclasses. 236 <b>Note</b>: This method must be overridden by subclasses.
229 </p><dl> 237 </p><dl>
230 <dt><i>cmd</i></dt> 238 <dt><i>command</i> (str)</dt>
231 <dd> 239 <dd>
232 commandstring (string) 240 command sent by the client
233 </dd><dt><i>params</i></dt> 241 </dd><dt><i>arguments</i> (list of str)</dt>
234 <dd> 242 <dd>
235 parameterstring (string) 243 list of command arguments
236 </dd> 244 </dd>
237 </dl><dl> 245 </dl><dl>
238 <dt>Raises <b>RuntimeError</b>:</dt> 246 <dt>Raises <b>RuntimeError</b>:</dt>
239 <dd> 247 <dd>
240 raised to indicate that this method must be 248 raised to indicate that this method must be

eric ide

mercurial