Documentation/Source/eric5.Utilities.SingleApplication.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 409
0ea528e80202
equal deleted inserted replaced
57:81326a94fdca 58:37f0444c3479
20 </style> 20 </style>
21 </head> 21 </head>
22 <body><a NAME="top" ID="top"></a> 22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.Utilities.SingleApplication</h1> 23 <h1>eric5.Utilities.SingleApplication</h1>
24 <p> 24 <p>
25 &#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114; &#97;&#110;&#100; &#99;&#108;&#105;&#101;&#110;&#116;. 25 Module implementing the single application server and client.
26 </p> 26 </p>
27 <h3>Global Attributes</h3> 27 <h3>Global Attributes</h3>
28 <table> 28 <table>
29 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
30 </table> 30 </table>
31 <h3>Classes</h3> 31 <h3>Classes</h3>
32 <table> 32 <table>
33 <tr> 33 <tr>
34 <td><a href="#SingleApplicationClient">SingleApplicationClient</a></td> 34 <td><a href="#SingleApplicationClient">SingleApplicationClient</a></td>
35 <td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#99;&#108;&#105;&#101;&#110;&#116; &#98;&#97;&#115;&#101; &#99;&#108;&#97;&#115;&#115;.</td> 35 <td>Class implementing the single application client base class.</td>
36 </tr><tr> 36 </tr><tr>
37 <td><a href="#SingleApplicationServer">SingleApplicationServer</a></td> 37 <td><a href="#SingleApplicationServer">SingleApplicationServer</a></td>
38 <td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114; &#98;&#97;&#115;&#101; &#99;&#108;&#97;&#115;&#115;.</td> 38 <td>Class implementing the single application server base class.</td>
39 </tr> 39 </tr>
40 </table> 40 </table>
41 <h3>Functions</h3> 41 <h3>Functions</h3>
42 <table> 42 <table>
43 <tr><td>None</td></tr> 43 <tr><td>None</td></tr>
44 </table> 44 </table>
45 <hr /><hr /> 45 <hr /><hr />
46 <a NAME="SingleApplicationClient" ID="SingleApplicationClient"></a> 46 <a NAME="SingleApplicationClient" ID="SingleApplicationClient"></a>
47 <h2>SingleApplicationClient</h2> 47 <h2>SingleApplicationClient</h2>
48 <p> 48 <p>
49 &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#99;&#108;&#105;&#101;&#110;&#116; &#98;&#97;&#115;&#101; &#99;&#108;&#97;&#115;&#115;. 49 Class implementing the single application client base class.
50 </p> 50 </p>
51 <h3>Derived from</h3> 51 <h3>Derived from</h3>
52 object 52 object
53 <h3>Class Attributes</h3> 53 <h3>Class Attributes</h3>
54 <table> 54 <table>
56 </table> 56 </table>
57 <h3>Methods</h3> 57 <h3>Methods</h3>
58 <table> 58 <table>
59 <tr> 59 <tr>
60 <td><a href="#SingleApplicationClient.__init__">SingleApplicationClient</a></td> 60 <td><a href="#SingleApplicationClient.__init__">SingleApplicationClient</a></td>
61 <td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td> 61 <td>Constructor</td>
62 </tr><tr> 62 </tr><tr>
63 <td><a href="#SingleApplicationClient.connect">connect</a></td> 63 <td><a href="#SingleApplicationClient.connect">connect</a></td>
64 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#111;&#110;&#110;&#101;&#99;&#116; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#99;&#108;&#105;&#101;&#110;&#116; &#116;&#111; &#105;&#116;&#115; &#115;&#101;&#114;v&#101;&#114;.</td> 64 <td>Public method to connect the single application client to its server.</td>
65 </tr><tr> 65 </tr><tr>
66 <td><a href="#SingleApplicationClient.disconnect">disconnect</a></td> 66 <td><a href="#SingleApplicationClient.disconnect">disconnect</a></td>
67 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#105;&#115;&#99;&#111;&#110;&#110;&#101;&#99;&#116; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#83;&#105;&#110;&#103;&#108;&#101; &#65;&#112;&#112;&#108;&#105;&#111;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114;.</td> 67 <td>Public method to disconnect from the Single Appliocation server.</td>
68 </tr><tr> 68 </tr><tr>
69 <td><a href="#SingleApplicationClient.errstr">errstr</a></td> 69 <td><a href="#SingleApplicationClient.errstr">errstr</a></td>
70 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#97; &#109;&#101;&#97;&#110;&#105;&#110;&#103;&#102;&#117;&#108; &#101;&#114;&#114;&#111;&#114; &#115;&#116;&#114;&#105;&#110;&#103; &#102;&#111;&#114; &#116;&#104;&#101; &#108;&#97;&#115;&#116; &#101;&#114;&#114;&#111;&#114;.</td> 70 <td>Public method to return a meaningful error string for the last error.</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#SingleApplicationClient.processArgs">processArgs</a></td> 72 <td><a href="#SingleApplicationClient.processArgs">processArgs</a></td>
73 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#112;&#114;&#111;&#99;&#101;&#115;&#115; &#116;&#104;&#101; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#108;&#105;&#110;&#101; &#97;&#114;&#103;&#115; &#112;&#97;&#115;&#115;&#101;&#100; &#116;&#111; &#116;&#104;&#101; &#85;&#73;.</td> 73 <td>Public method to process the command line args passed to the UI.</td>
74 </tr><tr> 74 </tr><tr>
75 <td><a href="#SingleApplicationClient.sendCommand">sendCommand</a></td> 75 <td><a href="#SingleApplicationClient.sendCommand">sendCommand</a></td>
76 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#110;&#100; &#116;&#104;&#101; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#116;&#111; &#116;&#104;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114;.</td> 76 <td>Public method to send the command to the application server.</td>
77 </tr> 77 </tr>
78 </table> 78 </table>
79 <a NAME="SingleApplicationClient.__init__" ID="SingleApplicationClient.__init__"></a> 79 <a NAME="SingleApplicationClient.__init__" ID="SingleApplicationClient.__init__"></a>
80 <h4>SingleApplicationClient (Constructor)</h4> 80 <h4>SingleApplicationClient (Constructor)</h4>
81 <b>SingleApplicationClient</b>(<i>name</i>) 81 <b>SingleApplicationClient</b>(<i>name</i>)
82 <p> 82 <p>
83 &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114; 83 Constructor
84 </p><dl> 84 </p><dl>
85 <dt><i>name</i></dt> 85 <dt><i>name</i></dt>
86 <dd> 86 <dd>
87 &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#108;&#111;&#99;&#97;&#108; &#115;&#101;&#114;v&#101;&#114; &#116;&#111; &#99;&#111;&#110;&#110;&#101;&#99;&#116; &#116;&#111; (&#115;&#116;&#114;&#105;&#110;&#103;) 87 name of the local server to connect to (string)
88 </dd> 88 </dd>
89 </dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a> 89 </dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a>
90 <h4>SingleApplicationClient.connect</h4> 90 <h4>SingleApplicationClient.connect</h4>
91 <b>connect</b>(<i></i>) 91 <b>connect</b>(<i></i>)
92 <p> 92 <p>
93 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#111;&#110;&#110;&#101;&#99;&#116; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#99;&#108;&#105;&#101;&#110;&#116; &#116;&#111; &#105;&#116;&#115; &#115;&#101;&#114;v&#101;&#114;. 93 Public method to connect the single application client to its server.
94 </p><dl> 94 </p><dl>
95 <dt>Returns:</dt> 95 <dt>Returns:</dt>
96 <dd> 96 <dd>
97 v&#97;&#108;&#117;&#101; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#115;&#117;&#99;&#99;&#101;&#115;&#115; &#111;&#114; &#97;&#110; &#101;&#114;&#114;&#111;&#114; &#110;&#117;&#109;&#98;&#101;&#114;. &#86;&#97;&#108;&#117;&#101; &#105;&#115; &#111;&#110;&#101; &#111;&#102;&#58; 97 value indicating success or an error number. Value is one of:
98 &#60;&#116;&#97;&#98;&#108;&#101;&#62; 98 <table>
99 &#60;&#116;&#114;&#62;&#60;&#116;&#100;&#62;&#48;&#60;/&#116;&#100;&#62;&#60;&#116;&#100;&#62;&#78;&#111; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#105;&#115; &#114;&#117;&#110;&#110;&#105;&#110;&#103;&#60;/&#116;&#100;&#62;&#60;/&#116;&#114;&#62; 99 <tr><td>0</td><td>No application is running</td></tr>
100 &#60;&#116;&#114;&#62;&#60;&#116;&#100;&#62;&#49;&#60;/&#116;&#100;&#62;&#60;&#116;&#100;&#62;&#65;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#105;&#115; &#97;&#108;&#114;&#101;&#97;&#100;y &#114;&#117;&#110;&#110;&#105;&#110;&#103;&#60;/&#116;&#100;&#62;&#60;/&#116;&#114;&#62; 100 <tr><td>1</td><td>Application is already running</td></tr>
101 &#60;/&#116;&#97;&#98;&#108;&#101;&#62; 101 </table>
102 </dd> 102 </dd>
103 </dl><a NAME="SingleApplicationClient.disconnect" ID="SingleApplicationClient.disconnect"></a> 103 </dl><a NAME="SingleApplicationClient.disconnect" ID="SingleApplicationClient.disconnect"></a>
104 <h4>SingleApplicationClient.disconnect</h4> 104 <h4>SingleApplicationClient.disconnect</h4>
105 <b>disconnect</b>(<i></i>) 105 <b>disconnect</b>(<i></i>)
106 <p> 106 <p>
107 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#105;&#115;&#99;&#111;&#110;&#110;&#101;&#99;&#116; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#83;&#105;&#110;&#103;&#108;&#101; &#65;&#112;&#112;&#108;&#105;&#111;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114;. 107 Public method to disconnect from the Single Appliocation server.
108 </p><a NAME="SingleApplicationClient.errstr" ID="SingleApplicationClient.errstr"></a> 108 </p><a NAME="SingleApplicationClient.errstr" ID="SingleApplicationClient.errstr"></a>
109 <h4>SingleApplicationClient.errstr</h4> 109 <h4>SingleApplicationClient.errstr</h4>
110 <b>errstr</b>(<i></i>) 110 <b>errstr</b>(<i></i>)
111 <p> 111 <p>
112 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#97; &#109;&#101;&#97;&#110;&#105;&#110;&#103;&#102;&#117;&#108; &#101;&#114;&#114;&#111;&#114; &#115;&#116;&#114;&#105;&#110;&#103; &#102;&#111;&#114; &#116;&#104;&#101; &#108;&#97;&#115;&#116; &#101;&#114;&#114;&#111;&#114;. 112 Public method to return a meaningful error string for the last error.
113 </p><dl> 113 </p><dl>
114 <dt>Returns:</dt> 114 <dt>Returns:</dt>
115 <dd> 115 <dd>
116 &#101;&#114;&#114;&#111;&#114; &#115;&#116;&#114;&#105;&#110;&#103; &#102;&#111;&#114; &#116;&#104;&#101; &#108;&#97;&#115;&#116; &#101;&#114;&#114;&#111;&#114; (&#115;&#116;&#114;&#105;&#110;&#103;) 116 error string for the last error (string)
117 </dd> 117 </dd>
118 </dl><a NAME="SingleApplicationClient.processArgs" ID="SingleApplicationClient.processArgs"></a> 118 </dl><a NAME="SingleApplicationClient.processArgs" ID="SingleApplicationClient.processArgs"></a>
119 <h4>SingleApplicationClient.processArgs</h4> 119 <h4>SingleApplicationClient.processArgs</h4>
120 <b>processArgs</b>(<i>args</i>) 120 <b>processArgs</b>(<i>args</i>)
121 <p> 121 <p>
122 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#112;&#114;&#111;&#99;&#101;&#115;&#115; &#116;&#104;&#101; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#108;&#105;&#110;&#101; &#97;&#114;&#103;&#115; &#112;&#97;&#115;&#115;&#101;&#100; &#116;&#111; &#116;&#104;&#101; &#85;&#73;. 122 Public method to process the command line args passed to the UI.
123 </p><p> 123 </p><p>
124 &#60;&#98;&#62;&#78;&#111;&#116;&#101;&#60;/&#98;&#62;&#58; &#84;&#104;&#105;&#115; &#109;&#101;&#116;&#104;&#111;&#100; &#109;&#117;&#115;&#116; &#98;&#101; &#111;v&#101;&#114;&#114;&#105;&#100;&#100;&#101;&#110; &#98;y &#115;&#117;&#98;&#99;&#108;&#97;&#115;&#115;&#101;&#115;. 124 <b>Note</b>: This method must be overridden by subclasses.
125 </p><dl> 125 </p><dl>
126 <dt><i>args</i></dt> 126 <dt><i>args</i></dt>
127 <dd> 127 <dd>
128 &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#108;&#105;&#110;&#101; &#97;&#114;&#103;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;) 128 command line args (list of strings)
129 </dd> 129 </dd>
130 </dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a> 130 </dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a>
131 <h4>SingleApplicationClient.sendCommand</h4> 131 <h4>SingleApplicationClient.sendCommand</h4>
132 <b>sendCommand</b>(<i>cmd</i>) 132 <b>sendCommand</b>(<i>cmd</i>)
133 <p> 133 <p>
134 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#110;&#100; &#116;&#104;&#101; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#116;&#111; &#116;&#104;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114;. 134 Public method to send the command to the application server.
135 </p><dl> 135 </p><dl>
136 <dt><i>cmd</i></dt> 136 <dt><i>cmd</i></dt>
137 <dd> 137 <dd>
138 &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#116;&#111; &#98;&#101; &#115;&#101;&#110;&#116; (&#115;&#116;&#114;&#105;&#110;&#103;) 138 command to be sent (string)
139 </dd> 139 </dd>
140 </dl> 140 </dl>
141 <div align="right"><a href="#top">Up</a></div> 141 <div align="right"><a href="#top">Up</a></div>
142 <hr /><hr /> 142 <hr /><hr />
143 <a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a> 143 <a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a>
144 <h2>SingleApplicationServer</h2> 144 <h2>SingleApplicationServer</h2>
145 <p> 145 <p>
146 &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#115;&#105;&#110;&#103;&#108;&#101; &#97;&#112;&#112;&#108;&#105;&#99;&#97;&#116;&#105;&#111;&#110; &#115;&#101;&#114;v&#101;&#114; &#98;&#97;&#115;&#101; &#99;&#108;&#97;&#115;&#115;. 146 Class implementing the single application server base class.
147 </p> 147 </p>
148 <h3>Derived from</h3> 148 <h3>Derived from</h3>
149 QLocalServer 149 QLocalServer
150 <h3>Class Attributes</h3> 150 <h3>Class Attributes</h3>
151 <table> 151 <table>
153 </table> 153 </table>
154 <h3>Methods</h3> 154 <h3>Methods</h3>
155 <table> 155 <table>
156 <tr> 156 <tr>
157 <td><a href="#SingleApplicationServer.__init__">SingleApplicationServer</a></td> 157 <td><a href="#SingleApplicationServer.__init__">SingleApplicationServer</a></td>
158 <td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td> 158 <td>Constructor</td>
159 </tr><tr> 159 </tr><tr>
160 <td><a href="#SingleApplicationServer.__disconnected">__disconnected</a></td> 160 <td><a href="#SingleApplicationServer.__disconnected">__disconnected</a></td>
161 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#99;&#108;&#111;&#115;&#117;&#114;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#111;&#99;&#107;&#101;&#116;.</td> 161 <td>Private method to handle the closure of the socket.</td>
162 </tr><tr> 162 </tr><tr>
163 <td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td> 163 <td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td>
164 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#97; &#110;&#101;w &#99;&#111;&#110;&#110;&#101;&#99;&#116;&#105;&#111;&#110;.</td> 164 <td>Private slot to handle a new connection.</td>
165 </tr><tr> 165 </tr><tr>
166 <td><a href="#SingleApplicationServer.__parseLine">__parseLine</a></td> 166 <td><a href="#SingleApplicationServer.__parseLine">__parseLine</a></td>
167 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#100;&#97;&#116;&#97; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#99;&#108;&#105;&#101;&#110;&#116;.</td> 167 <td>Private method to handle data from the client.</td>
168 </tr><tr> 168 </tr><tr>
169 <td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td> 169 <td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td>
170 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#115;&#101;&#110;&#116; &#98;y &#116;&#104;&#101; &#99;&#108;&#105;&#101;&#110;&#116;.</td> 170 <td>Public slot to handle the command sent by the client.</td>
171 </tr><tr> 171 </tr><tr>
172 <td><a href="#SingleApplicationServer.shutdown">shutdown</a></td> 172 <td><a href="#SingleApplicationServer.shutdown">shutdown</a></td>
173 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#117;&#115;&#101;&#100; &#116;&#111; &#115;&#104;&#117;&#116; &#100;&#111;w&#110; &#116;&#104;&#101; &#115;&#101;&#114;v&#101;&#114;.</td> 173 <td>Public method used to shut down the server.</td>
174 </tr> 174 </tr>
175 </table> 175 </table>
176 <a NAME="SingleApplicationServer.__init__" ID="SingleApplicationServer.__init__"></a> 176 <a NAME="SingleApplicationServer.__init__" ID="SingleApplicationServer.__init__"></a>
177 <h4>SingleApplicationServer (Constructor)</h4> 177 <h4>SingleApplicationServer (Constructor)</h4>
178 <b>SingleApplicationServer</b>(<i>name</i>) 178 <b>SingleApplicationServer</b>(<i>name</i>)
179 <p> 179 <p>
180 &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114; 180 Constructor
181 </p><dl> 181 </p><dl>
182 <dt><i>name</i></dt> 182 <dt><i>name</i></dt>
183 <dd> 183 <dd>
184 &#110;&#97;&#109;&#101; &#116;&#104;&#105;&#115; &#115;&#101;&#114;v&#101;&#114; &#105;&#115; &#108;&#105;&#115;&#116;&#101;&#110;&#105;&#110;&#103; &#116;&#111; (&#115;&#116;&#114;&#105;&#110;&#103;) 184 name this server is listening to (string)
185 </dd> 185 </dd>
186 </dl><a NAME="SingleApplicationServer.__disconnected" ID="SingleApplicationServer.__disconnected"></a> 186 </dl><a NAME="SingleApplicationServer.__disconnected" ID="SingleApplicationServer.__disconnected"></a>
187 <h4>SingleApplicationServer.__disconnected</h4> 187 <h4>SingleApplicationServer.__disconnected</h4>
188 <b>__disconnected</b>(<i></i>) 188 <b>__disconnected</b>(<i></i>)
189 <p> 189 <p>
190 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#99;&#108;&#111;&#115;&#117;&#114;&#101; &#111;&#102; &#116;&#104;&#101; &#115;&#111;&#99;&#107;&#101;&#116;. 190 Private method to handle the closure of the socket.
191 </p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a> 191 </p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a>
192 <h4>SingleApplicationServer.__newConnection</h4> 192 <h4>SingleApplicationServer.__newConnection</h4>
193 <b>__newConnection</b>(<i></i>) 193 <b>__newConnection</b>(<i></i>)
194 <p> 194 <p>
195 &#80;&#114;&#105;v&#97;&#116;&#101; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#97; &#110;&#101;w &#99;&#111;&#110;&#110;&#101;&#99;&#116;&#105;&#111;&#110;. 195 Private slot to handle a new connection.
196 </p><a NAME="SingleApplicationServer.__parseLine" ID="SingleApplicationServer.__parseLine"></a> 196 </p><a NAME="SingleApplicationServer.__parseLine" ID="SingleApplicationServer.__parseLine"></a>
197 <h4>SingleApplicationServer.__parseLine</h4> 197 <h4>SingleApplicationServer.__parseLine</h4>
198 <b>__parseLine</b>(<i></i>) 198 <b>__parseLine</b>(<i></i>)
199 <p> 199 <p>
200 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#100;&#97;&#116;&#97; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#99;&#108;&#105;&#101;&#110;&#116;. 200 Private method to handle data from the client.
201 </p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a> 201 </p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a>
202 <h4>SingleApplicationServer.handleCommand</h4> 202 <h4>SingleApplicationServer.handleCommand</h4>
203 <b>handleCommand</b>(<i>cmd, params</i>) 203 <b>handleCommand</b>(<i>cmd, params</i>)
204 <p> 204 <p>
205 &#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#99;&#111;&#109;&#109;&#97;&#110;&#100; &#115;&#101;&#110;&#116; &#98;y &#116;&#104;&#101; &#99;&#108;&#105;&#101;&#110;&#116;. 205 Public slot to handle the command sent by the client.
206 </p><p> 206 </p><p>
207 &#60;&#98;&#62;&#78;&#111;&#116;&#101;&#60;/&#98;&#62;&#58; &#84;&#104;&#105;&#115; &#109;&#101;&#116;&#104;&#111;&#100; &#109;&#117;&#115;&#116; &#98;&#101; &#111;v&#101;&#114;&#114;&#105;&#100;&#100;&#101;&#110; &#98;y &#115;&#117;&#98;&#99;&#108;&#97;&#115;&#115;&#101;&#115;. 207 <b>Note</b>: This method must be overridden by subclasses.
208 </p><dl> 208 </p><dl>
209 <dt><i>cmd</i></dt> 209 <dt><i>cmd</i></dt>
210 <dd> 210 <dd>
211 &#99;&#111;&#109;&#109;&#97;&#110;&#100;&#115;&#116;&#114;&#105;&#110;&#103; (&#115;&#116;&#114;&#105;&#110;&#103;) 211 commandstring (string)
212 </dd><dt><i>params</i></dt> 212 </dd><dt><i>params</i></dt>
213 <dd> 213 <dd>
214 &#112;&#97;&#114;&#97;&#109;&#101;&#116;&#101;&#114;&#115;&#116;&#114;&#105;&#110;&#103; (&#115;&#116;&#114;&#105;&#110;&#103;) 214 parameterstring (string)
215 </dd> 215 </dd>
216 </dl><a NAME="SingleApplicationServer.shutdown" ID="SingleApplicationServer.shutdown"></a> 216 </dl><a NAME="SingleApplicationServer.shutdown" ID="SingleApplicationServer.shutdown"></a>
217 <h4>SingleApplicationServer.shutdown</h4> 217 <h4>SingleApplicationServer.shutdown</h4>
218 <b>shutdown</b>(<i></i>) 218 <b>shutdown</b>(<i></i>)
219 <p> 219 <p>
220 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#117;&#115;&#101;&#100; &#116;&#111; &#115;&#104;&#117;&#116; &#100;&#111;w&#110; &#116;&#104;&#101; &#115;&#101;&#114;v&#101;&#114;. 220 Public method used to shut down the server.
221 </p> 221 </p>
222 <div align="right"><a href="#top">Up</a></div> 222 <div align="right"><a href="#top">Up</a></div>
223 <hr /> 223 <hr />
224 </body></html> 224 </body></html>

eric ide

mercurial