eric6/Documentation/Source/eric6.Utilities.BackgroundClient.html

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7631
2c7ccb4484bf
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.Utilities.BackgroundClient</h1> 23 <h1>eric6.Utilities.BackgroundClient</h1>
24
23 <p> 25 <p>
24 Module implementing a Qt free version of a background client for the various 26 Module implementing a Qt free version of a background client for the various
25 checkers and other python interpreter dependent functions. 27 checkers and other python interpreter dependent functions.
26 </p> 28 </p>
27 <h3>Global Attributes</h3> 29 <h3>Global Attributes</h3>
30
28 <table> 31 <table>
29 <tr><td>None</td></tr> 32 <tr><td>None</td></tr>
30 </table> 33 </table>
31 <h3>Classes</h3> 34 <h3>Classes</h3>
32 <table> 35
36 <table>
37
33 <tr> 38 <tr>
34 <td><a href="#BackgroundClient">BackgroundClient</a></td> 39 <td><a href="#BackgroundClient">BackgroundClient</a></td>
35 <td>Class implementing the main part of the background client.</td> 40 <td>Class implementing the main part of the background client.</td>
36 </tr> 41 </tr>
37 </table> 42 </table>
38 <h3>Functions</h3> 43 <h3>Functions</h3>
39 <table> 44
40 <tr><td>None</td></tr> 45 <table>
41 </table> 46 <tr><td>None</td></tr>
42 <hr /><hr /> 47 </table>
48 <hr />
49 <hr />
43 <a NAME="BackgroundClient" ID="BackgroundClient"></a> 50 <a NAME="BackgroundClient" ID="BackgroundClient"></a>
44 <h2>BackgroundClient</h2> 51 <h2>BackgroundClient</h2>
52
45 <p> 53 <p>
46 Class implementing the main part of the background client. 54 Class implementing the main part of the background client.
47 </p> 55 </p>
48 <h3>Derived from</h3> 56 <h3>Derived from</h3>
49 object 57 object
50 <h3>Class Attributes</h3> 58 <h3>Class Attributes</h3>
59
51 <table> 60 <table>
52 <tr><td>None</td></tr> 61 <tr><td>None</td></tr>
53 </table> 62 </table>
54 <h3>Class Methods</h3> 63 <h3>Class Methods</h3>
64
55 <table> 65 <table>
56 <tr><td>None</td></tr> 66 <tr><td>None</td></tr>
57 </table> 67 </table>
58 <h3>Methods</h3> 68 <h3>Methods</h3>
59 <table> 69
70 <table>
71
60 <tr> 72 <tr>
61 <td><a href="#BackgroundClient.__init__">BackgroundClient</a></td> 73 <td><a href="#BackgroundClient.__init__">BackgroundClient</a></td>
62 <td>Constructor of the BackgroundClient class.</td> 74 <td>Constructor of the BackgroundClient class.</td>
63 </tr><tr> 75 </tr>
76 <tr>
64 <td><a href="#BackgroundClient.__cancelled">__cancelled</a></td> 77 <td><a href="#BackgroundClient.__cancelled">__cancelled</a></td>
65 <td>Private method to check for a job cancellation.</td> 78 <td>Private method to check for a job cancellation.</td>
66 </tr><tr> 79 </tr>
80 <tr>
67 <td><a href="#BackgroundClient.__initClientService">__initClientService</a></td> 81 <td><a href="#BackgroundClient.__initClientService">__initClientService</a></td>
68 <td>Private method to import the given module and register it as service.</td> 82 <td>Private method to import the given module and register it as service.</td>
69 </tr><tr> 83 </tr>
84 <tr>
70 <td><a href="#BackgroundClient.__peek">__peek</a></td> 85 <td><a href="#BackgroundClient.__peek">__peek</a></td>
71 <td>Private methode to peek the given length of bytes.</td> 86 <td>Private methode to peek the given length of bytes.</td>
72 </tr><tr> 87 </tr>
88 <tr>
73 <td><a href="#BackgroundClient.__receive">__receive</a></td> 89 <td><a href="#BackgroundClient.__receive">__receive</a></td>
74 <td>Private methode to receive the given length of bytes.</td> 90 <td>Private methode to receive the given length of bytes.</td>
75 </tr><tr> 91 </tr>
92 <tr>
76 <td><a href="#BackgroundClient.__send">__send</a></td> 93 <td><a href="#BackgroundClient.__send">__send</a></td>
77 <td>Private method to send a job response back to the BackgroundService.</td> 94 <td>Private method to send a job response back to the BackgroundService.</td>
78 </tr><tr> 95 </tr>
96 <tr>
79 <td><a href="#BackgroundClient.run">run</a></td> 97 <td><a href="#BackgroundClient.run">run</a></td>
80 <td>Public method implementing the main loop of the client.</td> 98 <td>Public method implementing the main loop of the client.</td>
81 </tr> 99 </tr>
82 </table> 100 </table>
83 <h3>Static Methods</h3> 101 <h3>Static Methods</h3>
84 <table> 102
85 <tr><td>None</td></tr> 103 <table>
86 </table> 104 <tr><td>None</td></tr>
105 </table>
106
87 <a NAME="BackgroundClient.__init__" ID="BackgroundClient.__init__"></a> 107 <a NAME="BackgroundClient.__init__" ID="BackgroundClient.__init__"></a>
88 <h4>BackgroundClient (Constructor)</h4> 108 <h4>BackgroundClient (Constructor)</h4>
89 <b>BackgroundClient</b>(<i>host, port, maxProcs</i>) 109 <b>BackgroundClient</b>(<i>host, port, maxProcs</i>)
110
90 <p> 111 <p>
91 Constructor of the BackgroundClient class. 112 Constructor of the BackgroundClient class.
92 </p><dl> 113 </p>
114 <dl>
115
93 <dt><i>host</i> (str)</dt> 116 <dt><i>host</i> (str)</dt>
94 <dd> 117 <dd>
95 ip address the background service is listening 118 ip address the background service is listening
96 </dd><dt><i>port</i> (int)</dt> 119 </dd>
120 <dt><i>port</i> (int)</dt>
97 <dd> 121 <dd>
98 port of the background service 122 port of the background service
99 </dd><dt><i>maxProcs</i> (int)</dt> 123 </dd>
124 <dt><i>maxProcs</i> (int)</dt>
100 <dd> 125 <dd>
101 maximum number of CPUs (processes) to use 126 maximum number of CPUs (processes) to use
102 (0 = determined automatically) 127 (0 = determined automatically)
103 </dd> 128 </dd>
104 </dl><a NAME="BackgroundClient.__cancelled" ID="BackgroundClient.__cancelled"></a> 129 </dl>
130 <a NAME="BackgroundClient.__cancelled" ID="BackgroundClient.__cancelled"></a>
105 <h4>BackgroundClient.__cancelled</h4> 131 <h4>BackgroundClient.__cancelled</h4>
106 <b>__cancelled</b>(<i></i>) 132 <b>__cancelled</b>(<i></i>)
133
107 <p> 134 <p>
108 Private method to check for a job cancellation. 135 Private method to check for a job cancellation.
109 </p><dl> 136 </p>
137 <dl>
110 <dt>Returns:</dt> 138 <dt>Returns:</dt>
111 <dd> 139 <dd>
112 flag indicating a cancellation (boolean) 140 flag indicating a cancellation (boolean)
113 </dd> 141 </dd>
114 </dl><a NAME="BackgroundClient.__initClientService" ID="BackgroundClient.__initClientService"></a> 142 </dl>
143 <a NAME="BackgroundClient.__initClientService" ID="BackgroundClient.__initClientService"></a>
115 <h4>BackgroundClient.__initClientService</h4> 144 <h4>BackgroundClient.__initClientService</h4>
116 <b>__initClientService</b>(<i>fn, path, module</i>) 145 <b>__initClientService</b>(<i>fn, path, module</i>)
146
117 <p> 147 <p>
118 Private method to import the given module and register it as service. 148 Private method to import the given module and register it as service.
119 </p><dl> 149 </p>
150 <dl>
151
120 <dt><i>fn</i></dt> 152 <dt><i>fn</i></dt>
121 <dd> 153 <dd>
122 service name to register (str) 154 service name to register (str)
123 </dd><dt><i>path</i></dt> 155 </dd>
156 <dt><i>path</i></dt>
124 <dd> 157 <dd>
125 contains the path to the module (str) 158 contains the path to the module (str)
126 </dd><dt><i>module</i></dt> 159 </dd>
160 <dt><i>module</i></dt>
127 <dd> 161 <dd>
128 name to import (str) 162 name to import (str)
129 </dd> 163 </dd>
130 </dl><dl> 164 </dl>
165 <dl>
131 <dt>Returns:</dt> 166 <dt>Returns:</dt>
132 <dd> 167 <dd>
133 text result of the import action (str) 168 text result of the import action (str)
134 </dd> 169 </dd>
135 </dl><a NAME="BackgroundClient.__peek" ID="BackgroundClient.__peek"></a> 170 </dl>
171 <a NAME="BackgroundClient.__peek" ID="BackgroundClient.__peek"></a>
136 <h4>BackgroundClient.__peek</h4> 172 <h4>BackgroundClient.__peek</h4>
137 <b>__peek</b>(<i>length</i>) 173 <b>__peek</b>(<i>length</i>)
174
138 <p> 175 <p>
139 Private methode to peek the given length of bytes. 176 Private methode to peek the given length of bytes.
140 </p><dl> 177 </p>
178 <dl>
179
141 <dt><i>length</i></dt> 180 <dt><i>length</i></dt>
142 <dd> 181 <dd>
143 bytes to receive (int) 182 bytes to receive (int)
144 </dd> 183 </dd>
145 </dl><dl> 184 </dl>
185 <dl>
146 <dt>Returns:</dt> 186 <dt>Returns:</dt>
147 <dd> 187 <dd>
148 received bytes (bytes) 188 received bytes (bytes)
149 </dd> 189 </dd>
150 </dl><a NAME="BackgroundClient.__receive" ID="BackgroundClient.__receive"></a> 190 </dl>
191 <a NAME="BackgroundClient.__receive" ID="BackgroundClient.__receive"></a>
151 <h4>BackgroundClient.__receive</h4> 192 <h4>BackgroundClient.__receive</h4>
152 <b>__receive</b>(<i>length</i>) 193 <b>__receive</b>(<i>length</i>)
194
153 <p> 195 <p>
154 Private methode to receive the given length of bytes. 196 Private methode to receive the given length of bytes.
155 </p><dl> 197 </p>
198 <dl>
199
156 <dt><i>length</i></dt> 200 <dt><i>length</i></dt>
157 <dd> 201 <dd>
158 bytes to receive (int) 202 bytes to receive (int)
159 </dd> 203 </dd>
160 </dl><dl> 204 </dl>
205 <dl>
161 <dt>Returns:</dt> 206 <dt>Returns:</dt>
162 <dd> 207 <dd>
163 received bytes or None if connection closed (bytes) 208 received bytes or None if connection closed (bytes)
164 </dd> 209 </dd>
165 </dl><a NAME="BackgroundClient.__send" ID="BackgroundClient.__send"></a> 210 </dl>
211 <a NAME="BackgroundClient.__send" ID="BackgroundClient.__send"></a>
166 <h4>BackgroundClient.__send</h4> 212 <h4>BackgroundClient.__send</h4>
167 <b>__send</b>(<i>fx, fn, data</i>) 213 <b>__send</b>(<i>fx, fn, data</i>)
214
168 <p> 215 <p>
169 Private method to send a job response back to the BackgroundService. 216 Private method to send a job response back to the BackgroundService.
170 </p><dl> 217 </p>
218 <dl>
219
171 <dt><i>fx</i></dt> 220 <dt><i>fx</i></dt>
172 <dd> 221 <dd>
173 remote function name to execute (str) 222 remote function name to execute (str)
174 </dd><dt><i>fn</i></dt> 223 </dd>
224 <dt><i>fn</i></dt>
175 <dd> 225 <dd>
176 filename for identification (str) 226 filename for identification (str)
177 </dd><dt><i>data</i></dt> 227 </dd>
228 <dt><i>data</i></dt>
178 <dd> 229 <dd>
179 return value(s) (any basic datatype) 230 return value(s) (any basic datatype)
180 </dd> 231 </dd>
181 </dl><a NAME="BackgroundClient.run" ID="BackgroundClient.run"></a> 232 </dl>
233 <a NAME="BackgroundClient.run" ID="BackgroundClient.run"></a>
182 <h4>BackgroundClient.run</h4> 234 <h4>BackgroundClient.run</h4>
183 <b>run</b>(<i></i>) 235 <b>run</b>(<i></i>)
236
184 <p> 237 <p>
185 Public method implementing the main loop of the client. 238 Public method implementing the main loop of the client.
186 </p> 239 </p>
187 <div align="right"><a href="#top">Up</a></div> 240 <div align="right"><a href="#top">Up</a></div>
188 <hr /> 241 <hr />

eric ide

mercurial