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

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Utilities.BackgroundClient</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Utilities.BackgroundClient</h1>
23 <p>
24 Module implementing a Qt free version of a background client for the various
25 checkers and other python interpreter dependent functions.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#BackgroundClient">BackgroundClient</a></td>
35 <td>Class implementing the main part of the background client.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="BackgroundClient" ID="BackgroundClient"></a>
44 <h2>BackgroundClient</h2>
45 <p>
46 Class implementing the main part of the background client.
47 </p>
48 <h3>Derived from</h3>
49 object
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Class Methods</h3>
55 <table>
56 <tr><td>None</td></tr>
57 </table>
58 <h3>Methods</h3>
59 <table>
60 <tr>
61 <td><a href="#BackgroundClient.__init__">BackgroundClient</a></td>
62 <td>Constructor of the BackgroundClient class.</td>
63 </tr><tr>
64 <td><a href="#BackgroundClient.__cancelled">__cancelled</a></td>
65 <td>Private method to check for a job cancellation.</td>
66 </tr><tr>
67 <td><a href="#BackgroundClient.__initClientService">__initClientService</a></td>
68 <td>Private method to import the given module and register it as service.</td>
69 </tr><tr>
70 <td><a href="#BackgroundClient.__peek">__peek</a></td>
71 <td>Private methode to peek the given length of bytes.</td>
72 </tr><tr>
73 <td><a href="#BackgroundClient.__receive">__receive</a></td>
74 <td>Private methode to receive the given length of bytes.</td>
75 </tr><tr>
76 <td><a href="#BackgroundClient.__send">__send</a></td>
77 <td>Private method to send a job response back to the BackgroundService.</td>
78 </tr><tr>
79 <td><a href="#BackgroundClient.run">run</a></td>
80 <td>Public method implementing the main loop of the client.</td>
81 </tr>
82 </table>
83 <h3>Static Methods</h3>
84 <table>
85 <tr><td>None</td></tr>
86 </table>
87 <a NAME="BackgroundClient.__init__" ID="BackgroundClient.__init__"></a>
88 <h4>BackgroundClient (Constructor)</h4>
89 <b>BackgroundClient</b>(<i>host, port, maxProcs</i>)
90 <p>
91 Constructor of the BackgroundClient class.
92 </p><dl>
93 <dt><i>host</i> (str)</dt>
94 <dd>
95 ip address the background service is listening
96 </dd><dt><i>port</i> (int)</dt>
97 <dd>
98 port of the background service
99 </dd><dt><i>maxProcs</i> (int)</dt>
100 <dd>
101 maximum number of CPUs (processes) to use
102 (0 = determined automatically)
103 </dd>
104 </dl><a NAME="BackgroundClient.__cancelled" ID="BackgroundClient.__cancelled"></a>
105 <h4>BackgroundClient.__cancelled</h4>
106 <b>__cancelled</b>(<i></i>)
107 <p>
108 Private method to check for a job cancellation.
109 </p><dl>
110 <dt>Returns:</dt>
111 <dd>
112 flag indicating a cancellation (boolean)
113 </dd>
114 </dl><a NAME="BackgroundClient.__initClientService" ID="BackgroundClient.__initClientService"></a>
115 <h4>BackgroundClient.__initClientService</h4>
116 <b>__initClientService</b>(<i>fn, path, module</i>)
117 <p>
118 Private method to import the given module and register it as service.
119 </p><dl>
120 <dt><i>fn</i></dt>
121 <dd>
122 service name to register (str)
123 </dd><dt><i>path</i></dt>
124 <dd>
125 contains the path to the module (str)
126 </dd><dt><i>module</i></dt>
127 <dd>
128 name to import (str)
129 </dd>
130 </dl><dl>
131 <dt>Returns:</dt>
132 <dd>
133 text result of the import action (str)
134 </dd>
135 </dl><a NAME="BackgroundClient.__peek" ID="BackgroundClient.__peek"></a>
136 <h4>BackgroundClient.__peek</h4>
137 <b>__peek</b>(<i>length</i>)
138 <p>
139 Private methode to peek the given length of bytes.
140 </p><dl>
141 <dt><i>length</i></dt>
142 <dd>
143 bytes to receive (int)
144 </dd>
145 </dl><dl>
146 <dt>Returns:</dt>
147 <dd>
148 received bytes (bytes)
149 </dd>
150 </dl><a NAME="BackgroundClient.__receive" ID="BackgroundClient.__receive"></a>
151 <h4>BackgroundClient.__receive</h4>
152 <b>__receive</b>(<i>length</i>)
153 <p>
154 Private methode to receive the given length of bytes.
155 </p><dl>
156 <dt><i>length</i></dt>
157 <dd>
158 bytes to receive (int)
159 </dd>
160 </dl><dl>
161 <dt>Returns:</dt>
162 <dd>
163 received bytes or None if connection closed (bytes)
164 </dd>
165 </dl><a NAME="BackgroundClient.__send" ID="BackgroundClient.__send"></a>
166 <h4>BackgroundClient.__send</h4>
167 <b>__send</b>(<i>fx, fn, data</i>)
168 <p>
169 Private method to send a job response back to the BackgroundService.
170 </p><dl>
171 <dt><i>fx</i></dt>
172 <dd>
173 remote function name to execute (str)
174 </dd><dt><i>fn</i></dt>
175 <dd>
176 filename for identification (str)
177 </dd><dt><i>data</i></dt>
178 <dd>
179 return value(s) (any basic datatype)
180 </dd>
181 </dl><a NAME="BackgroundClient.run" ID="BackgroundClient.run"></a>
182 <h4>BackgroundClient.run</h4>
183 <b>run</b>(<i></i>)
184 <p>
185 Public method implementing the main loop of the client.
186 </p>
187 <div align="right"><a href="#top">Up</a></div>
188 <hr />
189 </body></html>

eric ide

mercurial