|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricNetwork.EricJsonStreamReader</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.EricNetwork.EricJsonStreamReader</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a JSON based reader class. |
|
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="#EricJsonReader">EricJsonReader</a></td> |
|
25 <td>Class implementing a JSON based reader class.</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="EricJsonReader" ID="EricJsonReader"></a> |
|
36 <h2>EricJsonReader</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a JSON based reader class. |
|
40 </p> |
|
41 <p> |
|
42 The reader is responsible for opening a socket to listen for writer |
|
43 connections. |
|
44 </p> |
|
45 <h3>Signals</h3> |
|
46 <dl> |
|
47 |
|
48 <dt>dataReceived(object)</dt> |
|
49 <dd> |
|
50 emitted after a data object was received |
|
51 </dd> |
|
52 </dl> |
|
53 <h3>Derived from</h3> |
|
54 QTcpServer |
|
55 <h3>Class Attributes</h3> |
|
56 |
|
57 <table> |
|
58 <tr><td>None</td></tr> |
|
59 </table> |
|
60 <h3>Class Methods</h3> |
|
61 |
|
62 <table> |
|
63 <tr><td>None</td></tr> |
|
64 </table> |
|
65 <h3>Methods</h3> |
|
66 |
|
67 <table> |
|
68 |
|
69 <tr> |
|
70 <td><a href="#EricJsonReader.__init__">EricJsonReader</a></td> |
|
71 <td>Constructor</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#EricJsonReader.__handleDisconnect">__handleDisconnect</a></td> |
|
75 <td>Private slot handling a disconnect of the writer.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#EricJsonReader.__receiveJson">__receiveJson</a></td> |
|
79 <td>Private slot handling received data from the writer.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#EricJsonReader.address">address</a></td> |
|
83 <td>Public method to get the host address.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#EricJsonReader.handleNewConnection">handleNewConnection</a></td> |
|
87 <td>Public slot for new incoming connections from a writer.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#EricJsonReader.port">port</a></td> |
|
91 <td>Public method to get the port number to connect to.</td> |
|
92 </tr> |
|
93 </table> |
|
94 <h3>Static Methods</h3> |
|
95 |
|
96 <table> |
|
97 <tr><td>None</td></tr> |
|
98 </table> |
|
99 |
|
100 <a NAME="EricJsonReader.__init__" ID="EricJsonReader.__init__"></a> |
|
101 <h4>EricJsonReader (Constructor)</h4> |
|
102 <b>EricJsonReader</b>(<i>name="", ip=None, parent=None</i>) |
|
103 |
|
104 <p> |
|
105 Constructor |
|
106 </p> |
|
107 <dl> |
|
108 |
|
109 <dt><i>name</i> (str)</dt> |
|
110 <dd> |
|
111 name of the server (used for output only) |
|
112 </dd> |
|
113 <dt><i>ip</i> (str)</dt> |
|
114 <dd> |
|
115 IP address to listen at |
|
116 </dd> |
|
117 <dt><i>parent</i> (QObject)</dt> |
|
118 <dd> |
|
119 parent object |
|
120 </dd> |
|
121 </dl> |
|
122 <a NAME="EricJsonReader.__handleDisconnect" ID="EricJsonReader.__handleDisconnect"></a> |
|
123 <h4>EricJsonReader.__handleDisconnect</h4> |
|
124 <b>__handleDisconnect</b>(<i></i>) |
|
125 |
|
126 <p> |
|
127 Private slot handling a disconnect of the writer. |
|
128 </p> |
|
129 <a NAME="EricJsonReader.__receiveJson" ID="EricJsonReader.__receiveJson"></a> |
|
130 <h4>EricJsonReader.__receiveJson</h4> |
|
131 <b>__receiveJson</b>(<i></i>) |
|
132 |
|
133 <p> |
|
134 Private slot handling received data from the writer. |
|
135 </p> |
|
136 <a NAME="EricJsonReader.address" ID="EricJsonReader.address"></a> |
|
137 <h4>EricJsonReader.address</h4> |
|
138 <b>address</b>(<i></i>) |
|
139 |
|
140 <p> |
|
141 Public method to get the host address. |
|
142 </p> |
|
143 <dl> |
|
144 <dt>Return:</dt> |
|
145 <dd> |
|
146 host address |
|
147 </dd> |
|
148 </dl> |
|
149 <dl> |
|
150 <dt>Return Type:</dt> |
|
151 <dd> |
|
152 str |
|
153 </dd> |
|
154 </dl> |
|
155 <a NAME="EricJsonReader.handleNewConnection" ID="EricJsonReader.handleNewConnection"></a> |
|
156 <h4>EricJsonReader.handleNewConnection</h4> |
|
157 <b>handleNewConnection</b>(<i></i>) |
|
158 |
|
159 <p> |
|
160 Public slot for new incoming connections from a writer. |
|
161 </p> |
|
162 <a NAME="EricJsonReader.port" ID="EricJsonReader.port"></a> |
|
163 <h4>EricJsonReader.port</h4> |
|
164 <b>port</b>(<i></i>) |
|
165 |
|
166 <p> |
|
167 Public method to get the port number to connect to. |
|
168 </p> |
|
169 <dl> |
|
170 <dt>Return:</dt> |
|
171 <dd> |
|
172 port number |
|
173 </dd> |
|
174 </dl> |
|
175 <dl> |
|
176 <dt>Return Type:</dt> |
|
177 <dd> |
|
178 int |
|
179 </dd> |
|
180 </dl> |
|
181 <div align="right"><a href="#top">Up</a></div> |
|
182 <hr /> |
|
183 </body></html> |