Browse Source

Documentation update

master
Dirk Alders 4 years ago
parent
commit
eff44b7988
91 changed files with 21124 additions and 245 deletions
  1. 325
    245
      __init__.py
  2. 4
    0
      _docs_/.buildinfo
  3. BIN
      _docs_/_downloads/f482679fb1771f4d05403bb87fd0cc34/unittest.pdf
  4. 23
    0
      _docs_/_sources/index.rst.txt
  5. 676
    0
      _docs_/_static/basic.css
  6. 1
    0
      _docs_/_static/css/badge_only.css
  7. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Bold.woff
  8. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Bold.woff2
  9. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Regular.woff
  10. BIN
      _docs_/_static/css/fonts/Roboto-Slab-Regular.woff2
  11. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.eot
  12. 2671
    0
      _docs_/_static/css/fonts/fontawesome-webfont.svg
  13. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.ttf
  14. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.woff
  15. BIN
      _docs_/_static/css/fonts/fontawesome-webfont.woff2
  16. BIN
      _docs_/_static/css/fonts/lato-bold-italic.woff
  17. BIN
      _docs_/_static/css/fonts/lato-bold-italic.woff2
  18. BIN
      _docs_/_static/css/fonts/lato-bold.woff
  19. BIN
      _docs_/_static/css/fonts/lato-bold.woff2
  20. BIN
      _docs_/_static/css/fonts/lato-normal-italic.woff
  21. BIN
      _docs_/_static/css/fonts/lato-normal-italic.woff2
  22. BIN
      _docs_/_static/css/fonts/lato-normal.woff
  23. BIN
      _docs_/_static/css/fonts/lato-normal.woff2
  24. 4
    0
      _docs_/_static/css/theme.css
  25. 315
    0
      _docs_/_static/doctools.js
  26. 10
    0
      _docs_/_static/documentation_options.js
  27. BIN
      _docs_/_static/file.png
  28. BIN
      _docs_/_static/fonts/FontAwesome.otf
  29. BIN
      _docs_/_static/fonts/Lato/lato-bold.eot
  30. BIN
      _docs_/_static/fonts/Lato/lato-bold.ttf
  31. BIN
      _docs_/_static/fonts/Lato/lato-bold.woff
  32. BIN
      _docs_/_static/fonts/Lato/lato-bold.woff2
  33. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.eot
  34. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.ttf
  35. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.woff
  36. BIN
      _docs_/_static/fonts/Lato/lato-bolditalic.woff2
  37. BIN
      _docs_/_static/fonts/Lato/lato-italic.eot
  38. BIN
      _docs_/_static/fonts/Lato/lato-italic.ttf
  39. BIN
      _docs_/_static/fonts/Lato/lato-italic.woff
  40. BIN
      _docs_/_static/fonts/Lato/lato-italic.woff2
  41. BIN
      _docs_/_static/fonts/Lato/lato-regular.eot
  42. BIN
      _docs_/_static/fonts/Lato/lato-regular.ttf
  43. BIN
      _docs_/_static/fonts/Lato/lato-regular.woff
  44. BIN
      _docs_/_static/fonts/Lato/lato-regular.woff2
  45. BIN
      _docs_/_static/fonts/Roboto-Slab-Bold.woff
  46. BIN
      _docs_/_static/fonts/Roboto-Slab-Bold.woff2
  47. BIN
      _docs_/_static/fonts/Roboto-Slab-Light.woff
  48. BIN
      _docs_/_static/fonts/Roboto-Slab-Light.woff2
  49. BIN
      _docs_/_static/fonts/Roboto-Slab-Regular.woff
  50. BIN
      _docs_/_static/fonts/Roboto-Slab-Regular.woff2
  51. BIN
      _docs_/_static/fonts/Roboto-Slab-Thin.woff
  52. BIN
      _docs_/_static/fonts/Roboto-Slab-Thin.woff2
  53. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot
  54. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf
  55. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff
  56. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2
  57. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot
  58. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf
  59. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff
  60. BIN
      _docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2
  61. BIN
      _docs_/_static/fonts/fontawesome-webfont.eot
  62. 2671
    0
      _docs_/_static/fonts/fontawesome-webfont.svg
  63. BIN
      _docs_/_static/fonts/fontawesome-webfont.ttf
  64. BIN
      _docs_/_static/fonts/fontawesome-webfont.woff
  65. BIN
      _docs_/_static/fonts/fontawesome-webfont.woff2
  66. BIN
      _docs_/_static/fonts/lato-bold-italic.woff
  67. BIN
      _docs_/_static/fonts/lato-bold-italic.woff2
  68. BIN
      _docs_/_static/fonts/lato-bold.woff
  69. BIN
      _docs_/_static/fonts/lato-bold.woff2
  70. BIN
      _docs_/_static/fonts/lato-normal-italic.woff
  71. BIN
      _docs_/_static/fonts/lato-normal-italic.woff2
  72. BIN
      _docs_/_static/fonts/lato-normal.woff
  73. BIN
      _docs_/_static/fonts/lato-normal.woff2
  74. 10365
    0
      _docs_/_static/jquery.js
  75. 1
    0
      _docs_/_static/js/badge_only.js
  76. 4
    0
      _docs_/_static/js/html5shiv-printshiv.min.js
  77. 4
    0
      _docs_/_static/js/html5shiv.min.js
  78. 4
    0
      _docs_/_static/js/modernizr.min.js
  79. 1
    0
      _docs_/_static/js/theme.js
  80. 297
    0
      _docs_/_static/language_data.js
  81. BIN
      _docs_/_static/minus.png
  82. BIN
      _docs_/_static/plus.png
  83. 69
    0
      _docs_/_static/pygments.css
  84. 481
    0
      _docs_/_static/searchtools.js
  85. 1692
    0
      _docs_/_static/underscore.js
  86. 353
    0
      _docs_/genindex.html
  87. 722
    0
      _docs_/index.html
  88. BIN
      _docs_/objects.inv
  89. 216
    0
      _docs_/py-modindex.html
  90. 214
    0
      _docs_/search.html
  91. 1
    0
      _docs_/searchindex.js

+ 325
- 245
__init__.py View File

@@ -15,12 +15,15 @@ socket_protocol (Socket Protocol)
15 15
 
16 16
 **Submodules:**
17 17
 
18
-* :class:`socket_protocol.struct_json_protocol`
19 18
 * :class:`socket_protocol.pure_json_protocol`
19
+* :class:`socket_protocol.struct_json_protocol`
20 20
 
21 21
 **Unittest:**
22 22
 
23
-        See also the :download:`unittest <../../socket_protocol/_testresults_/unittest.pdf>` documentation.
23
+        See also the :download:`unittest <../pylibs/socket_protocol/_testresults_/unittest.pdf>` documentation.
24
+
25
+**Module Documentation:**
26
+
24 27
 """
25 28
 __DEPENDENCIES__ = ['stringtools']
26 29
 
@@ -43,14 +46,14 @@ except ImportError:
43 46
 logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
44 47
 
45 48
 
46
-__DESCRIPTION__ = """The Module {\\tt %s} is designed to pack and unpack data for serial transportation.
49
+__DESCRIPTION__ = """The Module {\\tt %s} is designed for point to point communication for client-server issues.
47 50
 For more Information read the sphinx documentation.""" % __name__.replace('_', '\_')
48 51
 """The Module Description"""
49 52
 __INTERPRETER__ = (2, 3)
50 53
 """The Tested Interpreter-Versions"""
51 54
 
52 55
 
53
-class callback_storage(dict):
56
+class _callback_storage(dict):
54 57
     DEFAULT_CHANNEL_NAME = 'all_others'
55 58
 
56 59
     def __init__(self, channel_name):
@@ -95,6 +98,19 @@ class callback_storage(dict):
95 98
 
96 99
 
97 100
 class data_storage(dict):
101
+    """
102
+    :param status: The message status.
103
+    :type status: int
104
+    :param service_id: The Service-ID.
105
+    :type service_id: int
106
+    :param data_id: The Data-ID.
107
+    :type data_id: int
108
+    :param data: The transfered data.
109
+    :type data: any
110
+
111
+    This is a storage object for socket_protocol messages.
112
+    """
113
+
98 114
     KEY_STATUS = 'status'
99 115
     KEY_SERVICE_ID = 'service_id'
100 116
     KEY_DATA_ID = 'data_id'
@@ -104,107 +120,160 @@ class data_storage(dict):
104 120
         dict.__init__(self, *args, **kwargs)
105 121
 
106 122
     def get_status(self, default=None):
123
+        """
124
+        :param default: The default value, if no data is available.
125
+
126
+        This Method returns the message status.
127
+        """
107 128
         return self.get(self.KEY_STATUS, default)
108 129
 
109 130
     def get_service_id(self, default=None):
131
+        """
132
+        :param default: The default value, if no data is available.
133
+
134
+        This Method returns the message Service-ID.
135
+        """
110 136
         return self.get(self.KEY_SERVICE_ID, default)
111 137
 
112 138
     def get_data_id(self, default=None):
139
+        """
140
+        :param default: The default value, if no data is available.
141
+
142
+        This Method returns the message Data-ID.
143
+        """
113 144
         return self.get(self.KEY_DATA_ID, default)
114 145
 
115 146
     def get_data(self, default=None):
147
+        """
148
+        :param default: The default value, if no data is available.
149
+
150
+        This Method returns the message data.
151
+        """
116 152
         return self.get(self.KEY_DATA, default)
117 153
 
118 154
 
119
-class struct_json_protocol(object):
155
+class pure_json_protocol(object):
120 156
     """
121
-    :param comm_instance: a communication instance supportin at least these functions: :func:`register_callback`, :func:`register_disconnect_callback`, :func:`send`.
157
+    :param comm_instance: A communication instance.
122 158
     :type comm_instance: instance
123
-    :param secret: A secret (e.g. created by ``binascii.hexlify(os.urandom(24))``).
159
+    :param secret: An optinal secret (e.g. created by ``binascii.hexlify(os.urandom(24))``).
124 160
     :type secret: str
161
+    :param auto_auth: An optional parameter (True) to enable automatic authentification, otherwise you need to do it manually, if needed.
162
+    :type auto_auth: bool
163
+    :param channel_name: An optional parameter to set a channel name for logging of the communication.
164
+    :type channel_name: str
125 165
 
126
-    This communication protocol supports to transfer a Service-ID, Data-ID and Data. The transmitted data is shorter than :class:`pure_json_protocol`.
166
+    .. hint:: This `class` supports to transfer a Service-ID, Data-ID and Data.
127 167
 
128
-    .. note::
129
-        This class is here for compatibility reasons. Usage of :class:`pure_json_protocol` is recommended.
130
-
131
-    **Example:**
132
-
133
-    Server:
168
+        * The Service-ID is designed to identify the type of the communication (e.g. READ_REQUEST, WRITE_REQUEST, READ_RESPONSE, WRITE_RESPONSE, ...)
169
+        * The Data-ID is designed to identify the requests / responses using the same Service_ID.
134 170
 
135
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__struct_json_protocol_server.py
171
+    .. note:: The :class:`comm_instance` needs to have at least the following interface:
136 172
 
137
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__struct_json_protocol_server.log
173
+        * A Method :func:`comm_instance.init_channel_name` to set the channel name if needed.
174
+        * A Constant :const:`comm_instance.IS_CLIENT` to identify that the :class:`comm_instance` is a client (True) or a server (False).
175
+        * A Method :func:`comm_instance.is_connected` to identify if the instance is connected (True) or not (False).
176
+        * A Method :func:`comm_instance.reconnect` to initiate a reconnect.
177
+        * A Method :func:`comm_instance.register_callback` to register a data available callback.
178
+        * A Method :func:`comm_instance.register_connect_callback` to register a connect callback.
179
+        * A Method :func:`comm_instance.register_disconnect_callback` to register a disconnect callback.
180
+        * A Method :func:`comm_instance.send` to send data via the :class:`comm_instance`.
138 181
 
182
+    .. note::  The parameter :const:`auto_auth` is only relevant, if a secret is given and the :class:`comm_instance` is a client. The authentification is initiated directly after the connection is established.
139 183
 
140
-    Client:
184
+    .. note::  The :const:`channel_name`-exchange will be initiated by the client directly after the the connection is established.
141 185
 
142
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__struct_json_protocol_client.py
143
-
144
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__struct_json_protocol_client.log
186
+        * If a channel_name is given at both communication sides and they are different, the client name is taken over and the server will log a warning message.
145 187
     """
146 188
     DEFAULT_CHANNEL_NAME = 'all_others'
147 189
 
148 190
     SID_AUTH_SEED_REQUEST = 1
191
+    """SID for requesting a seed for authentification"""
149 192
     SID_AUTH_KEY_REQUEST = 2
193
+    """SID for requesting a key for the given seed"""
150 194
     SID_AUTH_KEY_CHECK_REQUEST = 3
195
+    """SID for request for checking a key"""
151 196
     SID_AUTH_KEY_CHECK_RESPONSE = 4
197
+    """SID for the authentification response"""
152 198
     SID_CHANNEL_NAME_REQUEST = 5
199
+    """SID for requesting a channel name exchange"""
153 200
     SID_CHANNEL_NAME_RESPONSE = 6
201
+    """SID for the channel name response"""
154 202
     SID_READ_REQUEST = 10
203
+    """SID for a read data request"""
155 204
     SID_READ_RESPONSE = 11
205
+    """SID for read data response"""
156 206
     SID_WRITE_REQUEST = 20
207
+    """SID for a write data request"""
157 208
     SID_WRITE_RESPONSE = 21
209
+    """SID for a write data response"""
158 210
     SID_EXECUTE_REQUEST = 30
211
+    """SID for a execute request"""
159 212
     SID_EXECUTE_RESPONSE = 31
160
-
161
-    SID_RESPONSE_DICT = {SID_AUTH_SEED_REQUEST: SID_AUTH_KEY_REQUEST,
162
-                         SID_AUTH_KEY_REQUEST: SID_AUTH_KEY_CHECK_REQUEST,
163
-                         SID_AUTH_KEY_CHECK_REQUEST: SID_AUTH_KEY_CHECK_RESPONSE,
164
-                         SID_CHANNEL_NAME_REQUEST: SID_CHANNEL_NAME_RESPONSE,
165
-                         SID_READ_REQUEST: SID_READ_RESPONSE,
166
-                         SID_WRITE_REQUEST: SID_WRITE_RESPONSE,
167
-                         SID_EXECUTE_REQUEST: SID_EXECUTE_RESPONSE}
168
-
169
-    SID_AUTH_LIST = [
213
+    """SID for a execute response"""
214
+
215
+    SID__RESPONSE_DICT = {SID_AUTH_SEED_REQUEST: SID_AUTH_KEY_REQUEST,
216
+                          SID_AUTH_KEY_REQUEST: SID_AUTH_KEY_CHECK_REQUEST,
217
+                          SID_AUTH_KEY_CHECK_REQUEST: SID_AUTH_KEY_CHECK_RESPONSE,
218
+                          SID_CHANNEL_NAME_REQUEST: SID_CHANNEL_NAME_RESPONSE,
219
+                          SID_READ_REQUEST: SID_READ_RESPONSE,
220
+                          SID_WRITE_REQUEST: SID_WRITE_RESPONSE,
221
+                          SID_EXECUTE_REQUEST: SID_EXECUTE_RESPONSE}
222
+    """Dictionary to get the SID for the response by the key which is the SID for the request"""
223
+
224
+    SID__NO_AUTH_LIST = [
170 225
         SID_AUTH_SEED_REQUEST,
171 226
         SID_AUTH_KEY_REQUEST,
172
-        SID_AUTH_KEY_CHECK_REQUEST, 
227
+        SID_AUTH_KEY_CHECK_REQUEST,
173 228
         SID_AUTH_KEY_CHECK_RESPONSE,
174 229
         SID_CHANNEL_NAME_REQUEST,
175 230
         SID_CHANNEL_NAME_RESPONSE
176 231
     ]
232
+    """List of SIDs without need of an authentification"""
177 233
 
178 234
     STATUS_OKAY = 0
235
+    """Status for 'okay'"""
179 236
     STATUS_BUFFERING_UNHANDLED_REQUEST = 1
237
+    """Status for 'unhandled request'"""
180 238
     STATUS_AUTH_REQUIRED = 2
239
+    """Status for 'authentification is required'"""
181 240
     STATUS_SERVICE_OR_DATA_UNKNOWN = 3
241
+    """Status for 'service or data unknown'"""
182 242
     STATUS_CHECKSUM_ERROR = 4
243
+    """Status for 'checksum error'"""
183 244
     STATUS_OPERATION_NOT_PERMITTED = 5
184
-    STATUS_NAMES = {STATUS_OKAY: 'Okay',
185
-                    STATUS_BUFFERING_UNHANDLED_REQUEST: 'Request has no callback. Data buffered.',
186
-                    STATUS_AUTH_REQUIRED: 'Authentification required',
187
-                    STATUS_SERVICE_OR_DATA_UNKNOWN: 'Service or Data unknown',
188
-                    STATUS_CHECKSUM_ERROR: 'Checksum Error',
189
-                    STATUS_OPERATION_NOT_PERMITTED: 'Operation not permitted'}
245
+    """Status for 'operation not permitted'"""
246
+    STATUS__NAMES = {STATUS_OKAY: 'Okay',
247
+                     STATUS_BUFFERING_UNHANDLED_REQUEST: 'Request has no callback. Data buffered.',
248
+                     STATUS_AUTH_REQUIRED: 'Authentification required',
249
+                     STATUS_SERVICE_OR_DATA_UNKNOWN: 'Service or Data unknown',
250
+                     STATUS_CHECKSUM_ERROR: 'Checksum Error',
251
+                     STATUS_OPERATION_NOT_PERMITTED: 'Operation not permitted'}
252
+    """Status names for previous defined states"""
190 253
 
191 254
     AUTH_STATE_UNKNOWN_CLIENT = 0
255
+    """Authentification Status for 'Unknown Client'"""
192 256
     AUTH_STATE_SEED_REQUESTED = 1
257
+    """Authentification Status for 'Seed was requested'"""
193 258
     AUTH_STATE_SEED_TRANSFERRED = 2
259
+    """Authentification Status for 'Seed has been sent'"""
194 260
     AUTH_STATE_KEY_TRANSFERRED = 3
261
+    """Authentification Status for 'Key has been sent'"""
195 262
     AUTH_STATE_TRUSTED_CLIENT = 4
196
-    AUTH_STATUS_NAMES = {AUTH_STATE_UNKNOWN_CLIENT: 'Unknown Client',
263
+    """Authentification Status for 'Trusted Connection'"""
264
+    AUTH_STATE__NAMES = {AUTH_STATE_UNKNOWN_CLIENT: 'Unknown Client',
197 265
                          AUTH_STATE_SEED_REQUESTED: 'Seed was requested',
198 266
                          AUTH_STATE_SEED_TRANSFERRED: 'Seed has been sent',
199 267
                          AUTH_STATE_KEY_TRANSFERRED: 'Key has been sent',
200
-                         AUTH_STATE_TRUSTED_CLIENT: 'Trusted Client'}
268
+                         AUTH_STATE_TRUSTED_CLIENT: 'Trusted Connection'}
269
+    """Authentification Status names for previous defined authentification states"""
201 270
 
202 271
     def __init__(self, comm_instance, secret=None, auto_auth=False, channel_name=None):
203 272
         self.__comm_inst__ = comm_instance
204 273
         self.__secret__ = secret
205 274
         self.__auto_auth__ = auto_auth
206 275
         #
207
-        self.__callbacks__ = callback_storage(channel_name)
276
+        self.__callbacks__ = _callback_storage(channel_name)
208 277
         self.__init_channel_name__(channel_name)
209 278
         #
210 279
         self.__clean_receive_buffer__()
@@ -220,13 +289,76 @@ class struct_json_protocol(object):
220 289
         self.__comm_inst__.register_connect_callback(self.__connection_established__)
221 290
         self.__comm_inst__.register_disconnect_callback(self.__authentification_state_reset__)
222 291
 
223
-    def __init_channel_name__(self, channel_name):
224
-        self.__comm_inst__.init_channel_name(channel_name)
225
-        self.__callbacks__.init_channel_name(channel_name)
226
-        if channel_name is None:
227
-            self.logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__ + '.' + self.DEFAULT_CHANNEL_NAME)
292
+    def __analyse_frame__(self, frame):
293
+        if sys.version_info >= (3, 0):
294
+            return data_storage(json.loads(frame[:-4].decode('utf-8')))
228 295
         else:
229
-            self.logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__ + '.' + channel_name)
296
+            return data_storage(json.loads(frame[:-4]))
297
+
298
+    def __authentificate_check_key__(self, msg):
299
+        key = msg.get_data()
300
+        if key == self.__authentificate_salt_and_hash__(self.__seed__):
301
+            self.__authentification_state__ = self.AUTH_STATE_TRUSTED_CLIENT
302
+            self.logger.info("%s Got correct key, sending positive authentification feedback", self.__log_prefix__())
303
+            return self.STATUS_OKAY, True
304
+        else:
305
+            self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT
306
+            self.logger.info("%s Got incorrect key, sending negative authentification feedback", self.__log_prefix__())
307
+            return self.STATUS_OKAY, False
308
+
309
+    def __authentificate_create_key__(self, msg):
310
+        self.logger.info("%s Got seed, sending key for authentification", self.__log_prefix__())
311
+        self.__authentification_state__ = self.AUTH_STATE_KEY_TRANSFERRED
312
+        seed = msg.get_data()
313
+        key = self.__authentificate_salt_and_hash__(seed)
314
+        return self.STATUS_OKAY, key
315
+
316
+    def __authentificate_create_seed__(self, msg):
317
+        self.logger.info("%s Got seed request, sending seed for authentification", self.__log_prefix__())
318
+        self.__authentification_state__ = self.AUTH_STATE_SEED_TRANSFERRED
319
+        if sys.version_info >= (3, 0):
320
+            self.__seed__ = binascii.hexlify(os.urandom(32)).decode('utf-8')
321
+        else:
322
+            self.__seed__ = binascii.hexlify(os.urandom(32))
323
+        return self.STATUS_OKAY, self.__seed__
324
+
325
+    def __authentificate_process_feedback__(self, msg):
326
+        feedback = msg.get_data()
327
+        if feedback:
328
+            self.__authentification_state__ = self.AUTH_STATE_TRUSTED_CLIENT
329
+            self.logger.info("%s Got positive authentification feedback", self.__log_prefix__())
330
+        else:
331
+            self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT
332
+            self.logger.warning("%s Got negative authentification feedback", self.__log_prefix__())
333
+        return self.STATUS_OKAY, None
334
+
335
+    def __authentificate_salt_and_hash__(self, seed):
336
+        if sys.version_info >= (3, 0):
337
+            return hashlib.sha512(bytes(seed, 'utf-8') + self.__secret__).hexdigest()
338
+        else:
339
+            return hashlib.sha512(seed.encode('utf-8') + self.__secret__.encode('utf-8')).hexdigest()
340
+
341
+    def __authentification_state_reset__(self):
342
+        self.logger.info("%s Resetting authentification state to AUTH_STATE_UNKNOWN_CLIENT", self.__log_prefix__())
343
+        self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT
344
+
345
+    def __buffer_received_data__(self, msg):
346
+        if not msg.get_service_id() in self.__msg_buffer__:
347
+            self.__msg_buffer__[msg.get_service_id()] = {}
348
+        if not msg.get_data_id() in self.__msg_buffer__[msg.get_service_id()]:
349
+            self.__msg_buffer__[msg.get_service_id()][msg.get_data_id()] = []
350
+        self.__msg_buffer__[msg.get_service_id()][msg.get_data_id()].append(msg)
351
+        self.logger.debug("%s Message data is stored in buffer and is now ready to be retrieved by receive method", self.__log_prefix__())
352
+
353
+    def __build_frame__(self, service_id, data_id, data, status=STATUS_OKAY):
354
+        data_frame = json.dumps(self.__mk_msg__(status, service_id, data_id, data))
355
+        if sys.version_info >= (3, 0):
356
+            data_frame = bytes(data_frame, 'utf-8')
357
+        checksum = self.__calc_chksum__(data_frame)
358
+        return data_frame + checksum
359
+
360
+    def __calc_chksum__(self, raw_data):
361
+        return struct.pack('>I', binascii.crc32(raw_data) & 0xffffffff)
230 362
 
231 363
     @property
232 364
     def __channel_name__(self):
@@ -234,24 +366,12 @@ class struct_json_protocol(object):
234 366
         if cn != self.DEFAULT_CHANNEL_NAME:
235 367
             return cn
236 368
 
237
-    def __log_prefix__(self):
238
-        return ' SP client:' if self.__comm_inst__.IS_CLIENT else ' SP server:'
239
-
240
-    def connected(self):
241
-        return self.__comm_inst__.is_connected()
242
-
243
-    def connection_established(self):
244
-        return self.connected() and (self.__secret__ is None or self.check_authentification_state())
245
-
246
-    def reconnect(self):
247
-        return self.__comm_inst__.reconnect()
248
-
249
-    def __connection_established__(self):
250
-        self.__clean_receive_buffer__()
251
-        if not self.__comm_inst__.IS_CLIENT:
252
-            self.send(self.SID_CHANNEL_NAME_REQUEST, 0, self.__channel_name__)
253
-        if self.__auto_auth__ and self.__comm_inst__.IS_CLIENT and self.__secret__ is not None:
254
-            self.authentificate()
369
+    def __channel_name_response__(self, msg):
370
+        data = msg.get_data()
371
+        if self.__channel_name__ is None and data is not None:
372
+            self.__init_channel_name__(data)
373
+            self.logger.info('%s channel name is now %s', self.__log_prefix__(), repr(self.__channel_name__))
374
+        return self.STATUS_OKAY, None
255 375
 
256 376
     def __channel_name_request__(self, msg):
257 377
         data = msg.get_data()
@@ -266,49 +386,12 @@ class struct_json_protocol(object):
266 386
                 self.logger.info('%s channel name is now %s', self.__log_prefix__(), repr(self.__channel_name__))
267 387
             return self.STATUS_OKAY, None
268 388
 
269
-    def __channel_name_response__(self, msg):
270
-        data = msg.get_data()
271
-        if self.__channel_name__ is None and data is not None:
272
-            self.__init_channel_name__(data)
273
-            self.logger.info('%s channel name is now %s', self.__log_prefix__(), repr(self.__channel_name__))
274
-        return self.STATUS_OKAY, None
275
-
276
-    def __authentification_state_reset__(self):
277
-        self.logger.info("%s Resetting authentification state to AUTH_STATE_UNKNOWN_CLIENT", self.__log_prefix__())
278
-        self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT
279
-
280
-    def __analyse_frame__(self, frame):
281
-        status, service_id, data_id = struct.unpack('>III', frame[0:12])
282
-        if sys.version_info >= (3, 0):
283
-            data = json.loads(frame[12:-1].decode('utf-8'))
284
-        else:
285
-            data = json.loads(frame[12:-1])
286
-        return self.__mk_msg__(status, service_id, data_id, data)
287
-
288
-    def __build_frame__(self, service_id, data_id, data, status=STATUS_OKAY):
289
-        frame = struct.pack('>III', status, service_id, data_id)
290
-        if sys.version_info >= (3, 0):
291
-            frame += bytes(json.dumps(data), 'utf-8')
292
-            frame += self.__calc_chksum__(frame)
293
-        else:
294
-            frame += json.dumps(data)
295
-            frame += self.__calc_chksum__(frame)
296
-        return frame
297
-
298
-    def __calc_chksum__(self, raw_data):
299
-        chksum = 0
300
-        for b in raw_data:
301
-            if sys.version_info >= (3, 0):
302
-                chksum ^= b
303
-            else:
304
-                chksum ^= ord(b)
305
-        if sys.version_info >= (3, 0):
306
-            return bytes([chksum])
307
-        else:
308
-            return chr(chksum)
309
-
310 389
     def __check_frame_checksum__(self, frame):
311
-        return self.__calc_chksum__(frame[:-1]) == frame[-1:]
390
+        return self.__calc_chksum__(frame[:-4]) == frame[-4:]
391
+
392
+    def __clean_receive_buffer__(self):
393
+        self.logger.debug("%s Cleaning up receive-buffer", self.__log_prefix__())
394
+        self.__msg_buffer__ = {}
312 395
 
313 396
     def __data_available_callback__(self, comm_inst):
314 397
         frame = comm_inst.receive()
@@ -325,14 +408,14 @@ class struct_json_protocol(object):
325 408
                 repr(msg.get_data())
326 409
             )
327 410
             callback, args, kwargs = self.__callbacks__.get(msg.get_service_id(), msg.get_data_id())
328
-            if msg.get_service_id() in self.SID_RESPONSE_DICT.keys():
411
+            if msg.get_service_id() in self.SID__RESPONSE_DICT.keys():
329 412
                 #
330 413
                 # REQUEST RECEIVED
331 414
                 #
332
-                if self.__secret__ is not None and not self.check_authentification_state() and msg.get_service_id() not in self.SID_AUTH_LIST:
415
+                if self.__secret__ is not None and not self.check_authentification_state() and msg.get_service_id() not in self.SID__NO_AUTH_LIST:
333 416
                     status = self.STATUS_AUTH_REQUIRED
334 417
                     data = None
335
-                    self.logger.warning("%s Received message needs authentification: %s. Sending negative response.", self.__log_prefix__(), self.AUTH_STATUS_NAMES.get(self.__authentification_state__, 'Unknown authentification status!'))
418
+                    self.logger.warning("%s Received message needs authentification: %s. Sending negative response.", self.__log_prefix__(), self.AUTH_STATE__NAMES.get(self.__authentification_state__, 'Unknown authentification status!'))
336 419
                 elif callback is None:
337 420
                     self.logger.warning("%s Received message with no registered callback. Sending negative response.", self.__log_prefix__())
338 421
                     status = self.STATUS_BUFFERING_UNHANDLED_REQUEST
@@ -343,13 +426,13 @@ class struct_json_protocol(object):
343 426
                         status, data = callback(msg, *args, **kwargs)
344 427
                     except TypeError:
345 428
                         raise TypeError('Check return value of callback function {callback_name} for service_id  {service_id} and data_id {data_id}'.format(callback_name=callback.__name__, service_id=repr(msg.get_service_id()), data_id=repr(msg.get_data_id())))
346
-                self.send(self.SID_RESPONSE_DICT[msg.get_service_id()], msg.get_data_id(), data, status=status)
429
+                self.send(self.SID__RESPONSE_DICT[msg.get_service_id()], msg.get_data_id(), data, status=status)
347 430
             else:
348 431
                 #
349 432
                 # RESPONSE RECEIVED
350 433
                 #
351 434
                 if msg.get_status() not in [self.STATUS_OKAY]:
352
-                    self.logger.warning("%s Received message has a peculiar status: %s", self.__log_prefix__(), self.STATUS_NAMES.get(msg.get_status(), 'Unknown status response!'))
435
+                    self.logger.warning("%s Received message has a peculiar status: %s", self.__log_prefix__(), self.STATUS__NAMES.get(msg.get_status(), 'Unknown status response!'))
353 436
                 if callback is None:
354 437
                     status = self.STATUS_OKAY
355 438
                     data = None
@@ -361,83 +444,27 @@ class struct_json_protocol(object):
361 444
                     except TypeError:
362 445
                         raise TypeError('Check return value of callback function {callback_name} for service_id  {service_id} and data_id {data_id}'.format(callback_name=callback.__name__, service_id=repr(msg.get_service_id()), data_id=repr(msg.get_data_id())))
363 446
 
364
-    def __buffer_received_data__(self, msg):
365
-        if not msg.get_service_id() in self.__msg_buffer__:
366
-            self.__msg_buffer__[msg.get_service_id()] = {}
367
-        if not msg.get_data_id() in self.__msg_buffer__[msg.get_service_id()]:
368
-            self.__msg_buffer__[msg.get_service_id()][msg.get_data_id()] = []
369
-        self.__msg_buffer__[msg.get_service_id()][msg.get_data_id()].append(msg)
370
-        self.logger.debug("%s Message data is stored in buffer and is now ready to be retrieved by receive method", self.__log_prefix__())
447
+    def __connection_established__(self):
448
+        self.__clean_receive_buffer__()
449
+        if not self.__comm_inst__.IS_CLIENT:
450
+            self.send(self.SID_CHANNEL_NAME_REQUEST, 0, self.__channel_name__)
451
+        if self.__auto_auth__ and self.__comm_inst__.IS_CLIENT and self.__secret__ is not None:
452
+            self.authentificate()
371 453
 
372
-    def __clean_receive_buffer__(self):
373
-        self.logger.debug("%s Cleaning up receive-buffer", self.__log_prefix__())
374
-        self.__msg_buffer__ = {}
454
+    def __init_channel_name__(self, channel_name):
455
+        self.__comm_inst__.init_channel_name(channel_name)
456
+        self.__callbacks__.init_channel_name(channel_name)
457
+        if channel_name is None:
458
+            self.logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__ + '.' + self.DEFAULT_CHANNEL_NAME)
459
+        else:
460
+            self.logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__ + '.' + channel_name)
375 461
 
376
-    def receive(self, service_id, data_id, timeout=1):
377
-        data = None
378
-        cnt = 0
379
-        while data is None and cnt < timeout * 10:
380
-            try:
381
-                data = self.__msg_buffer__.get(service_id, {}).get(data_id, []).pop(0)
382
-            except IndexError:
383
-                data = None
384
-            cnt += 1
385
-            time.sleep(0.1)
386
-        if data is None and cnt >= timeout * 10:
387
-            self.logger.warning('%s TIMEOUT (%ss): Requested data (service_id: %s; data_id: %s) not in buffer.', self.__log_prefix__(), repr(timeout), repr(service_id), repr(data_id))
388
-        return data
462
+    def __log_prefix__(self):
463
+        return ' SP client:' if self.__comm_inst__.IS_CLIENT else ' SP server:'
389 464
 
390 465
     def __mk_msg__(self, status, service_id, data_id, data):
391 466
         return data_storage({data_storage.KEY_DATA_ID: data_id, data_storage.KEY_SERVICE_ID: service_id, data_storage.KEY_STATUS: status, data_storage.KEY_DATA: data})
392 467
 
393
-    def send(self, service_id, data_id, data, status=STATUS_OKAY, timeout=2, log_lvl=logging.INFO):
394
-        """
395
-        :param service_id: The Service-ID for the message. See class definitions starting with ``SERVICE_``.
396
-        :type service_id: int
397
-        :param data_id: The Data-ID for the message.
398
-        :type data_id: int
399
-        :param data: The data to be transfered. The data needs to be json compatible.
400
-        :type data: str
401
-        :param status: The Status for the message. All requests should have ``STATUS_OKAY``.
402
-        :type status: int
403
-        :param timeout: The timeout for sending data (e.g. time to establish new connection).
404
-        :type timeout: float
405
-        :param rx_log_lvl: The log level to log outgoing TX-data
406
-        :type rx_log_lvl: int
407
-        :return: True if data had been sent, otherwise False.
408
-        :rtype: bool
409
-
410
-        This methods sends out a message with the given content.
411
-        """
412
-        self.logger.log(log_lvl, '%s TX -> status: %d, service_id: %d, data_id: %d, data: "%s"', self.__log_prefix__(), status, service_id, data_id, repr(data))
413
-        return self.__comm_inst__.send(self.__build_frame__(service_id, data_id, data, status), timeout=timeout, log_lvl=logging.DEBUG)
414
-
415
-    def register_callback(self, service_id, data_id, callback, *args, **kwargs):
416
-        """
417
-        :param service_id: The Service-ID for the message. See class definitions starting with ``SID_``.
418
-        :type service_id: int
419
-        :param data_id: The Data-ID for the message.
420
-        :type data_id: int
421
-        :returns: True, if registration was successfull; False, if registration failed (e.g. existance of a callback for this configuration)
422
-        :rtype: bool
423
-
424
-        This method registers a callback for the given parameters. Givin ``None`` means, that all Service-IDs or all Data-IDs are used.
425
-        If a message hitting these parameters has been received, the callback will be executed.
426
-
427
-        .. note:: The :func:`callback` is priorised in the following order:
428
-
429
-            * Callbacks with defined Service-ID and Data-ID.
430
-            * Callbacks with a defined Data-ID.
431
-            * Callbacks with a defined Service-ID.
432
-            * Unspecific Callbacks
433
-
434
-        .. note:: The :func:`callback` is executed with these arguments:
435
-
436
-            :param msg: A :class:`dict` containing all message information.
437
-            :returns: status (see class definition starting with ``STATUS_``), response_data (JSON compatible object)
438
-        """
439
-        self.__callbacks__.add(service_id, data_id, callback, *args, **kwargs)
440
-
441 468
     def authentificate(self, timeout=2):
442 469
         """
443 470
         :param timeout: The timeout for the authentification (requesting seed, sending key and getting authentification_feedback).
@@ -472,92 +499,145 @@ class struct_json_protocol(object):
472 499
         """
473 500
         return self.__authentification_state__ == self.AUTH_STATE_TRUSTED_CLIENT
474 501
 
475
-    def __authentificate_salt_and_hash__(self, seed):
476
-        if sys.version_info >= (3, 0):
477
-            return hashlib.sha512(bytes(seed, 'utf-8') + self.__secret__).hexdigest()
478
-        else:
479
-            return hashlib.sha512(seed.encode('utf-8') + self.__secret__.encode('utf-8')).hexdigest()
502
+    def connection_established(self):
503
+        """
504
+        :return: True, if the connection is established (incl. authentification, if a secret has been given)
505
+        :rtype: bool
506
+        """
507
+        return self.is_connected() and (self.__secret__ is None or self.check_authentification_state())
480 508
 
481
-    def __authentificate_create_seed__(self, msg):
482
-        self.logger.info("%s Got seed request, sending seed for authentification", self.__log_prefix__())
483
-        self.__authentification_state__ = self.AUTH_STATE_SEED_TRANSFERRED
484
-        if sys.version_info >= (3, 0):
485
-            self.__seed__ = binascii.hexlify(os.urandom(32)).decode('utf-8')
486
-        else:
487
-            self.__seed__ = binascii.hexlify(os.urandom(32))
488
-        return self.STATUS_OKAY, self.__seed__
509
+    def is_connected(self):
510
+        """
511
+        :return: True if the :class:`comm_instance` is connected, otherwise False..
512
+        :rtype: bool
489 513
 
490
-    def __authentificate_create_key__(self, msg):
491
-        self.logger.info("%s Got seed, sending key for authentification", self.__log_prefix__())
492
-        self.__authentification_state__ = self.AUTH_STATE_KEY_TRANSFERRED
493
-        seed = msg.get_data()
494
-        key = self.__authentificate_salt_and_hash__(seed)
495
-        return self.STATUS_OKAY, key
514
+        This methods returns the return value of :func:`comm_instance.is_connected`.
515
+        """
516
+        return self.__comm_inst__.is_connected()
496 517
 
497
-    def __authentificate_check_key__(self, msg):
498
-        key = msg.get_data()
499
-        if key == self.__authentificate_salt_and_hash__(self.__seed__):
500
-            self.__authentification_state__ = self.AUTH_STATE_TRUSTED_CLIENT
501
-            self.logger.info("%s Got correct key, sending positive authentification feedback", self.__log_prefix__())
502
-            return self.STATUS_OKAY, True
503
-        else:
504
-            self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT
505
-            self.logger.info("%s Got incorrect key, sending negative authentification feedback", self.__log_prefix__())
506
-            return self.STATUS_OKAY, False
518
+    def receive(self, service_id, data_id, timeout=1):
519
+        """
520
+        :param service_id: The Service-ID for the message. See class definitions starting with ``SID_``.
521
+        :type service_id: int
522
+        :param data_id: The Data-ID for the message.
523
+        :type data_id: int
524
+        :param timeout: The timeout for receiving.
525
+        :type timeout: float
526
+        :returns: The received data storage object or None, if no data was received.
527
+        :rtype: data_storage
528
+        """
529
+        data = None
530
+        cnt = 0
531
+        while data is None and cnt < timeout * 10:
532
+            try:
533
+                data = self.__msg_buffer__.get(service_id, {}).get(data_id, []).pop(0)
534
+            except IndexError:
535
+                data = None
536
+            cnt += 1
537
+            time.sleep(0.1)
538
+        if data is None and cnt >= timeout * 10:
539
+            self.logger.warning('%s TIMEOUT (%ss): Requested data (service_id: %s; data_id: %s) not in buffer.', self.__log_prefix__(), repr(timeout), repr(service_id), repr(data_id))
540
+        return data
507 541
 
508
-    def __authentificate_process_feedback__(self, msg):
509
-        feedback = msg.get_data()
510
-        if feedback:
511
-            self.__authentification_state__ = self.AUTH_STATE_TRUSTED_CLIENT
512
-            self.logger.info("%s Got positive authentification feedback", self.__log_prefix__())
513
-        else:
514
-            self.__authentification_state__ = self.AUTH_STATE_UNKNOWN_CLIENT
515
-            self.logger.warning("%s Got negative authentification feedback", self.__log_prefix__())
516
-        return self.STATUS_OKAY, None
542
+    def reconnect(self):
543
+        """
544
+        This methods initiates a reconnect by calling :func:`comm_instance.reconnect`.
545
+        """
546
+        return self.__comm_inst__.reconnect()
547
+
548
+    def register_callback(self, service_id, data_id, callback, *args, **kwargs):
549
+        """
550
+        :param service_id: The Service-ID for the message. See class definitions starting with ``SID_``.
551
+        :type service_id: int
552
+        :param data_id: The Data-ID for the message.
553
+        :type data_id: int
554
+        :returns: True, if registration was successfull; False, if registration failed (e.g. existance of a callback for this configuration)
555
+        :rtype: bool
517 556
 
557
+        This method registers a callback for the given parameters. Givin ``None`` means, that all Service-IDs or all Data-IDs are used.
558
+        If a message hitting these parameters has been received, the callback will be executed.
518 559
 
519
-class pure_json_protocol(struct_json_protocol):
520
-    """
521
-    :param comm_instance: a communication instance supportin at least these functions: :func:`register_callback`, :func:`register_disconnect_callback`, :func:`send`.
522
-    :type comm_instance: instance
523
-    :param secret: A secret (e.g. created by ``binascii.hexlify(os.urandom(24))``).
524
-    :type secret: str
560
+        .. note:: The :func:`callback` is priorised in the following order:
525 561
 
526
-    This communication protocol supports to transfer a Service-ID, Data-ID and Data.
562
+            * Callbacks with defined Service-ID and Data-ID.
563
+            * Callbacks with a defined Data-ID.
564
+            * Callbacks with a defined Service-ID.
565
+            * Unspecific Callbacks
566
+
567
+        .. note:: The :func:`callback` is executed with these arguments:
527 568
 
528
-    **Example:**
569
+            :param msg: A :class:`data_storage` object containing all message information.
570
+            :returns: (:const:`status`, :const:`response_data`)
529 571
 
530
-    Server:
572
+            * :const:`status`: A status as defined as a constant of this class :const:`STA_*` to be used as status for the response.
573
+            * :const:`response_data`: A JSON iterable object to be used as data for the response.
531 574
 
532
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__pure_json_protocol_server.py
575
+        .. note:: Only callbacks defined in :const:`pure_json_protocol.SID__RESPONSE_DICT` will send a response, using a Service-ID given in the dict and the same Data-ID to the client.
576
+        """
577
+        self.__callbacks__.add(service_id, data_id, callback, *args, **kwargs)
533 578
 
534
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__pure_json_protocol_server.log
579
+    def send(self, service_id, data_id, data, status=STATUS_OKAY, timeout=2, log_lvl=logging.INFO):
580
+        """
581
+        :param service_id: The Service-ID for the message. See class definitions starting with ``SERVICE_``.
582
+        :type service_id: int
583
+        :param data_id: The Data-ID for the message.
584
+        :type data_id: int
585
+        :param data: The data to be transfered. The data needs to be json compatible.
586
+        :type data: str
587
+        :param status: The Status for the message. All requests should have ``STATUS_OKAY``.
588
+        :type status: int
589
+        :param timeout: The timeout for sending data (e.g. time to establish new connection).
590
+        :type timeout: float
591
+        :param rx_log_lvl: The log level to log outgoing TX-data
592
+        :type rx_log_lvl: int
593
+        :return: True if data had been sent, otherwise False.
594
+        :rtype: bool
535 595
 
596
+        This methods sends out a message with the given content.
597
+        """
598
+        self.logger.log(log_lvl, '%s TX -> status: %d, service_id: %d, data_id: %d, data: "%s"', self.__log_prefix__(), status, service_id, data_id, repr(data))
599
+        return self.__comm_inst__.send(self.__build_frame__(service_id, data_id, data, status), timeout=timeout, log_lvl=logging.DEBUG)
536 600
 
537
-    Client:
538 601
 
539
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__pure_json_protocol_client.py
602
+class struct_json_protocol(pure_json_protocol):
603
+    """
604
+    This Class has the same functionality like :class:`pure_json_protocol`. The message length is less than for :class:`pure_json_protocol`, but the functionality and compatibility is reduced.
540 605
 
541
-    .. literalinclude:: ../../socket_protocol/_examples_/socket_protocol__pure_json_protocol_client.log
606
+    .. note::
607
+        This class is depreceated and here for compatibility reasons (to support old clients or servers). Usage of :class:`pure_json_protocol` is recommended.
542 608
     """
543 609
     def __init__(self, *args, **kwargs):
544
-        struct_json_protocol.__init__(self, *args, **kwargs)
610
+        pure_json_protocol.__init__(self, *args, **kwargs)
545 611
 
546
-    def __build_frame__(self, service_id, data_id, data, status=struct_json_protocol.STATUS_OKAY):
547
-        data_frame = json.dumps(self.__mk_msg__(status, service_id, data_id, data))
612
+    def __analyse_frame__(self, frame):
613
+        status, service_id, data_id = struct.unpack('>III', frame[0:12])
548 614
         if sys.version_info >= (3, 0):
549
-            data_frame = bytes(data_frame, 'utf-8')
550
-        checksum = self.__calc_chksum__(data_frame)
551
-        return data_frame + checksum
615
+            data = json.loads(frame[12:-1].decode('utf-8'))
616
+        else:
617
+            data = json.loads(frame[12:-1])
618
+        return self.__mk_msg__(status, service_id, data_id, data)
552 619
 
553
-    def __analyse_frame__(self, frame):
620
+    def __build_frame__(self, service_id, data_id, data, status=pure_json_protocol.STATUS_OKAY):
621
+        frame = struct.pack('>III', status, service_id, data_id)
554 622
         if sys.version_info >= (3, 0):
555
-            return data_storage(json.loads(frame[:-4].decode('utf-8')))
623
+            frame += bytes(json.dumps(data), 'utf-8')
624
+            frame += self.__calc_chksum__(frame)
556 625
         else:
557
-            return data_storage(json.loads(frame[:-4]))
626
+            frame += json.dumps(data)
627
+            frame += self.__calc_chksum__(frame)
628
+        return frame
558 629
 
559 630
     def __calc_chksum__(self, raw_data):
560
-        return struct.pack('>I', binascii.crc32(raw_data) & 0xffffffff)
631
+        chksum = 0
632
+        for b in raw_data:
633
+            if sys.version_info >= (3, 0):
634
+                chksum ^= b
635
+            else:
636
+                chksum ^= ord(b)
637
+        if sys.version_info >= (3, 0):
638
+            return bytes([chksum])
639
+        else:
640
+            return chr(chksum)
561 641
 
562 642
     def __check_frame_checksum__(self, frame):
563
-        return self.__calc_chksum__(frame[:-4]) == frame[-4:]
643
+        return self.__calc_chksum__(frame[:-1]) == frame[-1:]

+ 4
- 0
_docs_/.buildinfo View File

@@ -0,0 +1,4 @@
1
+# Sphinx build info version 1
2
+# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
+config: 84bc88da236ad2fe1e0ad2143091c944
4
+tags: 645f666f9bcd5a90fca523b33c5a78b7

BIN
_docs_/_downloads/f482679fb1771f4d05403bb87fd0cc34/unittest.pdf View File


+ 23
- 0
_docs_/_sources/index.rst.txt View File

@@ -0,0 +1,23 @@
1
+.. socket_protocol documentation master file, created by
2
+   sphinx-quickstart on Fri Jan  1 19:56:01 2021.
3
+   You can adapt this file completely to your liking, but it should at least
4
+   contain the root `toctree` directive.
5
+
6
+Welcome to socket_protocol's documentation!
7
+===========================================
8
+
9
+.. automodule:: socket_protocol
10
+   :members:
11
+
12
+.. toctree::
13
+   :maxdepth: 2
14
+   :caption: Contents:
15
+
16
+
17
+
18
+Indices and tables
19
+==================
20
+
21
+* :ref:`genindex`
22
+* :ref:`modindex`
23
+* :ref:`search`

+ 676
- 0
_docs_/_static/basic.css View File

@@ -0,0 +1,676 @@
1
+/*
2
+ * basic.css
3
+ * ~~~~~~~~~
4
+ *
5
+ * Sphinx stylesheet -- basic theme.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/* -- main layout ----------------------------------------------------------- */
13
+
14
+div.clearer {
15
+    clear: both;
16
+}
17
+
18
+/* -- relbar ---------------------------------------------------------------- */
19
+
20
+div.related {
21
+    width: 100%;
22
+    font-size: 90%;
23
+}
24
+
25
+div.related h3 {
26
+    display: none;
27
+}
28
+
29
+div.related ul {
30
+    margin: 0;
31
+    padding: 0 0 0 10px;
32
+    list-style: none;
33
+}
34
+
35
+div.related li {
36
+    display: inline;
37
+}
38
+
39
+div.related li.right {
40
+    float: right;
41
+    margin-right: 5px;
42
+}
43
+
44
+/* -- sidebar --------------------------------------------------------------- */
45
+
46
+div.sphinxsidebarwrapper {
47
+    padding: 10px 5px 0 10px;
48
+}
49
+
50
+div.sphinxsidebar {
51
+    float: left;
52
+    width: 230px;
53
+    margin-left: -100%;
54
+    font-size: 90%;
55
+    word-wrap: break-word;
56
+    overflow-wrap : break-word;
57
+}
58
+
59
+div.sphinxsidebar ul {
60
+    list-style: none;
61
+}
62
+
63
+div.sphinxsidebar ul ul,
64
+div.sphinxsidebar ul.want-points {
65
+    margin-left: 20px;
66
+    list-style: square;
67
+}
68
+
69
+div.sphinxsidebar ul ul {
70
+    margin-top: 0;
71
+    margin-bottom: 0;
72
+}
73
+
74
+div.sphinxsidebar form {
75
+    margin-top: 10px;
76
+}
77
+
78
+div.sphinxsidebar input {
79
+    border: 1px solid #98dbcc;
80
+    font-family: sans-serif;
81
+    font-size: 1em;
82
+}
83
+
84
+div.sphinxsidebar #searchbox form.search {
85
+    overflow: hidden;
86
+}
87
+
88
+div.sphinxsidebar #searchbox input[type="text"] {
89
+    float: left;
90
+    width: 80%;
91
+    padding: 0.25em;
92
+    box-sizing: border-box;
93
+}
94
+
95
+div.sphinxsidebar #searchbox input[type="submit"] {
96
+    float: left;
97
+    width: 20%;
98
+    border-left: none;
99
+    padding: 0.25em;
100
+    box-sizing: border-box;
101
+}
102
+
103
+
104
+img {
105
+    border: 0;
106
+    max-width: 100%;
107
+}
108
+
109
+/* -- search page ----------------------------------------------------------- */
110
+
111
+ul.search {
112
+    margin: 10px 0 0 20px;
113
+    padding: 0;
114
+}
115
+
116
+ul.search li {
117
+    padding: 5px 0 5px 20px;
118
+    background-image: url(file.png);
119
+    background-repeat: no-repeat;
120
+    background-position: 0 7px;
121
+}
122
+
123
+ul.search li a {
124
+    font-weight: bold;
125
+}
126
+
127
+ul.search li div.context {
128
+    color: #888;
129
+    margin: 2px 0 0 30px;
130
+    text-align: left;
131
+}
132
+
133
+ul.keywordmatches li.goodmatch a {
134
+    font-weight: bold;
135
+}
136
+
137
+/* -- index page ------------------------------------------------------------ */
138
+
139
+table.contentstable {
140
+    width: 90%;
141
+    margin-left: auto;
142
+    margin-right: auto;
143
+}
144
+
145
+table.contentstable p.biglink {
146
+    line-height: 150%;
147
+}
148
+
149
+a.biglink {
150
+    font-size: 1.3em;
151
+}
152
+
153
+span.linkdescr {
154
+    font-style: italic;
155
+    padding-top: 5px;
156
+    font-size: 90%;
157
+}
158
+
159
+/* -- general index --------------------------------------------------------- */
160
+
161
+table.indextable {
162
+    width: 100%;
163
+}
164
+
165
+table.indextable td {
166
+    text-align: left;
167
+    vertical-align: top;
168
+}
169
+
170
+table.indextable ul {
171
+    margin-top: 0;
172
+    margin-bottom: 0;
173
+    list-style-type: none;
174
+}
175
+
176
+table.indextable > tbody > tr > td > ul {
177
+    padding-left: 0em;
178
+}
179
+
180
+table.indextable tr.pcap {
181
+    height: 10px;
182
+}
183
+
184
+table.indextable tr.cap {
185
+    margin-top: 10px;
186
+    background-color: #f2f2f2;
187
+}
188
+
189
+img.toggler {
190
+    margin-right: 3px;
191
+    margin-top: 3px;
192
+    cursor: pointer;
193
+}
194
+
195
+div.modindex-jumpbox {
196
+    border-top: 1px solid #ddd;
197
+    border-bottom: 1px solid #ddd;
198
+    margin: 1em 0 1em 0;
199
+    padding: 0.4em;
200
+}
201
+
202
+div.genindex-jumpbox {
203
+    border-top: 1px solid #ddd;
204
+    border-bottom: 1px solid #ddd;
205
+    margin: 1em 0 1em 0;
206
+    padding: 0.4em;
207
+}
208
+
209
+/* -- domain module index --------------------------------------------------- */
210
+
211
+table.modindextable td {
212
+    padding: 2px;
213
+    border-collapse: collapse;
214
+}
215
+
216
+/* -- general body styles --------------------------------------------------- */
217
+
218
+div.body {
219
+    min-width: 450px;
220
+    max-width: 800px;
221
+}
222
+
223
+div.body p, div.body dd, div.body li, div.body blockquote {
224
+    -moz-hyphens: auto;
225
+    -ms-hyphens: auto;
226
+    -webkit-hyphens: auto;
227
+    hyphens: auto;
228
+}
229
+
230
+a.headerlink {
231
+    visibility: hidden;
232
+}
233
+
234
+h1:hover > a.headerlink,
235
+h2:hover > a.headerlink,
236
+h3:hover > a.headerlink,
237
+h4:hover > a.headerlink,
238
+h5:hover > a.headerlink,
239
+h6:hover > a.headerlink,
240
+dt:hover > a.headerlink,
241
+caption:hover > a.headerlink,
242
+p.caption:hover > a.headerlink,
243
+div.code-block-caption:hover > a.headerlink {
244
+    visibility: visible;
245
+}
246
+
247
+div.body p.caption {
248
+    text-align: inherit;
249
+}
250
+
251
+div.body td {
252
+    text-align: left;
253
+}
254
+
255
+.first {
256
+    margin-top: 0 !important;
257
+}
258
+
259
+p.rubric {
260
+    margin-top: 30px;
261
+    font-weight: bold;
262
+}
263
+
264
+img.align-left, .figure.align-left, object.align-left {
265
+    clear: left;
266
+    float: left;
267
+    margin-right: 1em;
268
+}
269
+
270
+img.align-right, .figure.align-right, object.align-right {
271
+    clear: right;
272
+    float: right;
273
+    margin-left: 1em;
274
+}
275
+
276
+img.align-center, .figure.align-center, object.align-center {
277
+  display: block;
278
+  margin-left: auto;
279
+  margin-right: auto;
280
+}
281
+
282
+.align-left {
283
+    text-align: left;
284
+}
285
+
286
+.align-center {
287
+    text-align: center;
288
+}
289
+
290
+.align-right {
291
+    text-align: right;
292
+}
293
+
294
+/* -- sidebars -------------------------------------------------------------- */
295
+
296
+div.sidebar {
297
+    margin: 0 0 0.5em 1em;
298
+    border: 1px solid #ddb;
299
+    padding: 7px 7px 0 7px;
300
+    background-color: #ffe;
301
+    width: 40%;
302
+    float: right;
303
+}
304
+
305
+p.sidebar-title {
306
+    font-weight: bold;
307
+}
308
+
309
+/* -- topics ---------------------------------------------------------------- */
310
+
311
+div.topic {
312
+    border: 1px solid #ccc;
313
+    padding: 7px 7px 0 7px;
314
+    margin: 10px 0 10px 0;
315
+}
316
+
317
+p.topic-title {
318
+    font-size: 1.1em;
319
+    font-weight: bold;
320
+    margin-top: 10px;
321
+}
322
+
323
+/* -- admonitions ----------------------------------------------------------- */
324
+
325
+div.admonition {
326
+    margin-top: 10px;
327
+    margin-bottom: 10px;
328
+    padding: 7px;
329
+}
330
+
331
+div.admonition dt {
332
+    font-weight: bold;
333
+}
334
+
335
+div.admonition dl {
336
+    margin-bottom: 0;
337
+}
338
+
339
+p.admonition-title {
340
+    margin: 0px 10px 5px 0px;
341
+    font-weight: bold;
342
+}
343
+
344
+div.body p.centered {
345
+    text-align: center;
346
+    margin-top: 25px;
347
+}
348
+
349
+/* -- tables ---------------------------------------------------------------- */
350
+
351
+table.docutils {
352
+    border: 0;
353
+    border-collapse: collapse;
354
+}
355
+
356
+table.align-center {
357
+    margin-left: auto;
358
+    margin-right: auto;
359
+}
360
+
361
+table caption span.caption-number {
362
+    font-style: italic;
363
+}
364
+
365
+table caption span.caption-text {
366
+}
367
+
368
+table.docutils td, table.docutils th {
369
+    padding: 1px 8px 1px 5px;
370
+    border-top: 0;
371
+    border-left: 0;
372
+    border-right: 0;
373
+    border-bottom: 1px solid #aaa;
374
+}
375
+
376
+table.footnote td, table.footnote th {
377
+    border: 0 !important;
378
+}
379
+
380
+th {
381
+    text-align: left;
382
+    padding-right: 5px;
383
+}
384
+
385
+table.citation {
386
+    border-left: solid 1px gray;
387
+    margin-left: 1px;
388
+}
389
+
390
+table.citation td {
391
+    border-bottom: none;
392
+}
393
+
394
+/* -- figures --------------------------------------------------------------- */
395
+
396
+div.figure {
397
+    margin: 0.5em;
398
+    padding: 0.5em;
399
+}
400
+
401
+div.figure p.caption {
402
+    padding: 0.3em;
403
+}
404
+
405
+div.figure p.caption span.caption-number {
406
+    font-style: italic;
407
+}
408
+
409
+div.figure p.caption span.caption-text {
410
+}
411
+
412
+/* -- field list styles ----------------------------------------------------- */
413
+
414
+table.field-list td, table.field-list th {
415
+    border: 0 !important;
416
+}
417
+
418
+.field-list ul {
419
+    margin: 0;
420
+    padding-left: 1em;
421
+}
422
+
423
+.field-list p {
424
+    margin: 0;
425
+}
426
+
427
+.field-name {
428
+    -moz-hyphens: manual;
429
+    -ms-hyphens: manual;
430
+    -webkit-hyphens: manual;
431
+    hyphens: manual;
432
+}
433
+
434
+/* -- hlist styles ---------------------------------------------------------- */
435
+
436
+table.hlist td {
437
+    vertical-align: top;
438
+}
439
+
440
+
441
+/* -- other body styles ----------------------------------------------------- */
442
+
443
+ol.arabic {
444
+    list-style: decimal;
445
+}
446
+
447
+ol.loweralpha {
448
+    list-style: lower-alpha;
449
+}
450
+
451
+ol.upperalpha {
452
+    list-style: upper-alpha;
453
+}
454
+
455
+ol.lowerroman {
456
+    list-style: lower-roman;
457
+}
458
+
459
+ol.upperroman {
460
+    list-style: upper-roman;
461
+}
462
+
463
+dl {
464
+    margin-bottom: 15px;
465
+}
466
+
467
+dd p {
468
+    margin-top: 0px;
469
+}
470
+
471
+dd ul, dd table {
472
+    margin-bottom: 10px;
473
+}
474
+
475
+dd {
476
+    margin-top: 3px;
477
+    margin-bottom: 10px;
478
+    margin-left: 30px;
479
+}
480
+
481
+dt:target, span.highlighted {
482
+    background-color: #fbe54e;
483
+}
484
+
485
+rect.highlighted {
486
+    fill: #fbe54e;
487
+}
488
+
489
+dl.glossary dt {
490
+    font-weight: bold;
491
+    font-size: 1.1em;
492
+}
493
+
494
+.optional {
495
+    font-size: 1.3em;
496
+}
497
+
498
+.sig-paren {
499
+    font-size: larger;
500
+}
501
+
502
+.versionmodified {
503
+    font-style: italic;
504
+}
505
+
506
+.system-message {
507
+    background-color: #fda;
508
+    padding: 5px;
509
+    border: 3px solid red;
510
+}
511
+
512
+.footnote:target  {
513
+    background-color: #ffa;
514
+}
515
+
516
+.line-block {
517
+    display: block;
518
+    margin-top: 1em;
519
+    margin-bottom: 1em;
520
+}
521
+
522
+.line-block .line-block {
523
+    margin-top: 0;
524
+    margin-bottom: 0;
525
+    margin-left: 1.5em;
526
+}
527
+
528
+.guilabel, .menuselection {
529
+    font-family: sans-serif;
530
+}
531
+
532
+.accelerator {
533
+    text-decoration: underline;
534
+}
535
+
536
+.classifier {
537
+    font-style: oblique;
538
+}
539
+
540
+abbr, acronym {
541
+    border-bottom: dotted 1px;
542
+    cursor: help;
543
+}
544
+
545
+/* -- code displays --------------------------------------------------------- */
546
+
547
+pre {
548
+    overflow: auto;
549
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
550
+}
551
+
552
+span.pre {
553
+    -moz-hyphens: none;
554
+    -ms-hyphens: none;
555
+    -webkit-hyphens: none;
556
+    hyphens: none;
557
+}
558
+
559
+td.linenos pre {
560
+    padding: 5px 0px;
561
+    border: 0;
562
+    background-color: transparent;
563
+    color: #aaa;
564
+}
565
+
566
+table.highlighttable {
567
+    margin-left: 0.5em;
568
+}
569
+
570
+table.highlighttable td {
571
+    padding: 0 0.5em 0 0.5em;
572
+}
573
+
574
+div.code-block-caption {
575
+    padding: 2px 5px;
576
+    font-size: small;
577
+}
578
+
579
+div.code-block-caption code {
580
+    background-color: transparent;
581
+}
582
+
583
+div.code-block-caption + div > div.highlight > pre {
584
+    margin-top: 0;
585
+}
586
+
587
+div.code-block-caption span.caption-number {
588
+    padding: 0.1em 0.3em;
589
+    font-style: italic;
590
+}
591
+
592
+div.code-block-caption span.caption-text {
593
+}
594
+
595
+div.literal-block-wrapper {
596
+    padding: 1em 1em 0;
597
+}
598
+
599
+div.literal-block-wrapper div.highlight {
600
+    margin: 0;
601
+}
602
+
603
+code.descname {
604
+    background-color: transparent;
605
+    font-weight: bold;
606
+    font-size: 1.2em;
607
+}
608
+
609
+code.descclassname {
610
+    background-color: transparent;
611
+}
612
+
613
+code.xref, a code {
614
+    background-color: transparent;
615
+    font-weight: bold;
616
+}
617
+
618
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
619
+    background-color: transparent;
620
+}
621
+
622
+.viewcode-link {
623
+    float: right;
624
+}
625
+
626
+.viewcode-back {
627
+    float: right;
628
+    font-family: sans-serif;
629
+}
630
+
631
+div.viewcode-block:target {
632
+    margin: -1px -10px;
633
+    padding: 0 10px;
634
+}
635
+
636
+/* -- math display ---------------------------------------------------------- */
637
+
638
+img.math {
639
+    vertical-align: middle;
640
+}
641
+
642
+div.body div.math p {
643
+    text-align: center;
644
+}
645
+
646
+span.eqno {
647
+    float: right;
648
+}
649
+
650
+span.eqno a.headerlink {
651
+    position: relative;
652
+    left: 0px;
653
+    z-index: 1;
654
+}
655
+
656
+div.math:hover a.headerlink {
657
+    visibility: visible;
658
+}
659
+
660
+/* -- printout stylesheet --------------------------------------------------- */
661
+
662
+@media print {
663
+    div.document,
664
+    div.documentwrapper,
665
+    div.bodywrapper {
666
+        margin: 0 !important;
667
+        width: 100%;
668
+    }
669
+
670
+    div.sphinxsidebar,
671
+    div.related,
672
+    div.footer,
673
+    #top-link {
674
+        display: none;
675
+    }
676
+}

+ 1
- 0
_docs_/_static/css/badge_only.css View File

@@ -0,0 +1 @@
1
+.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}

BIN
_docs_/_static/css/fonts/Roboto-Slab-Bold.woff View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Bold.woff2 View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Regular.woff View File


BIN
_docs_/_static/css/fonts/Roboto-Slab-Regular.woff2 View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.eot View File


+ 2671
- 0
_docs_/_static/css/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.ttf View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.woff View File


BIN
_docs_/_static/css/fonts/fontawesome-webfont.woff2 View File


BIN
_docs_/_static/css/fonts/lato-bold-italic.woff View File


BIN
_docs_/_static/css/fonts/lato-bold-italic.woff2 View File


BIN
_docs_/_static/css/fonts/lato-bold.woff View File


BIN
_docs_/_static/css/fonts/lato-bold.woff2 View File


BIN
_docs_/_static/css/fonts/lato-normal-italic.woff View File


BIN
_docs_/_static/css/fonts/lato-normal-italic.woff2 View File


BIN
_docs_/_static/css/fonts/lato-normal.woff View File


BIN
_docs_/_static/css/fonts/lato-normal.woff2 View File


+ 4
- 0
_docs_/_static/css/theme.css
File diff suppressed because it is too large
View File


+ 315
- 0
_docs_/_static/doctools.js View File

@@ -0,0 +1,315 @@
1
+/*
2
+ * doctools.js
3
+ * ~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for all documentation.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+/**
13
+ * select a different prefix for underscore
14
+ */
15
+$u = _.noConflict();
16
+
17
+/**
18
+ * make the code below compatible with browsers without
19
+ * an installed firebug like debugger
20
+if (!window.console || !console.firebug) {
21
+  var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22
+    "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23
+    "profile", "profileEnd"];
24
+  window.console = {};
25
+  for (var i = 0; i < names.length; ++i)
26
+    window.console[names[i]] = function() {};
27
+}
28
+ */
29
+
30
+/**
31
+ * small helper function to urldecode strings
32
+ */
33
+jQuery.urldecode = function(x) {
34
+  return decodeURIComponent(x).replace(/\+/g, ' ');
35
+};
36
+
37
+/**
38
+ * small helper function to urlencode strings
39
+ */
40
+jQuery.urlencode = encodeURIComponent;
41
+
42
+/**
43
+ * This function returns the parsed url parameters of the
44
+ * current request. Multiple values per key are supported,
45
+ * it will always return arrays of strings for the value parts.
46
+ */
47
+jQuery.getQueryParameters = function(s) {
48
+  if (typeof s === 'undefined')
49
+    s = document.location.search;
50
+  var parts = s.substr(s.indexOf('?') + 1).split('&');
51
+  var result = {};
52
+  for (var i = 0; i < parts.length; i++) {
53
+    var tmp = parts[i].split('=', 2);
54
+    var key = jQuery.urldecode(tmp[0]);
55
+    var value = jQuery.urldecode(tmp[1]);
56
+    if (key in result)
57
+      result[key].push(value);
58
+    else
59
+      result[key] = [value];
60
+  }
61
+  return result;
62
+};
63
+
64
+/**
65
+ * highlight a given string on a jquery object by wrapping it in
66
+ * span elements with the given class name.
67
+ */
68
+jQuery.fn.highlightText = function(text, className) {
69
+  function highlight(node, addItems) {
70
+    if (node.nodeType === 3) {
71
+      var val = node.nodeValue;
72
+      var pos = val.toLowerCase().indexOf(text);
73
+      if (pos >= 0 &&
74
+          !jQuery(node.parentNode).hasClass(className) &&
75
+          !jQuery(node.parentNode).hasClass("nohighlight")) {
76
+        var span;
77
+        var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
78
+        if (isInSVG) {
79
+          span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
80
+        } else {
81
+          span = document.createElement("span");
82
+          span.className = className;
83
+        }
84
+        span.appendChild(document.createTextNode(val.substr(pos, text.length)));
85
+        node.parentNode.insertBefore(span, node.parentNode.insertBefore(
86
+          document.createTextNode(val.substr(pos + text.length)),
87
+          node.nextSibling));
88
+        node.nodeValue = val.substr(0, pos);
89
+        if (isInSVG) {
90
+          var bbox = span.getBBox();
91
+          var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
92
+       	  rect.x.baseVal.value = bbox.x;
93
+          rect.y.baseVal.value = bbox.y;
94
+          rect.width.baseVal.value = bbox.width;
95
+          rect.height.baseVal.value = bbox.height;
96
+          rect.setAttribute('class', className);
97
+          var parentOfText = node.parentNode.parentNode;
98
+          addItems.push({
99
+              "parent": node.parentNode,
100
+              "target": rect});
101
+        }
102
+      }
103
+    }
104
+    else if (!jQuery(node).is("button, select, textarea")) {
105
+      jQuery.each(node.childNodes, function() {
106
+        highlight(this, addItems);
107
+      });
108
+    }
109
+  }
110
+  var addItems = [];
111
+  var result = this.each(function() {
112
+    highlight(this, addItems);
113
+  });
114
+  for (var i = 0; i < addItems.length; ++i) {
115
+    jQuery(addItems[i].parent).before(addItems[i].target);
116
+  }
117
+  return result;
118
+};
119
+
120
+/*
121
+ * backward compatibility for jQuery.browser
122
+ * This will be supported until firefox bug is fixed.
123
+ */
124
+if (!jQuery.browser) {
125
+  jQuery.uaMatch = function(ua) {
126
+    ua = ua.toLowerCase();
127
+
128
+    var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
129
+      /(webkit)[ \/]([\w.]+)/.exec(ua) ||
130
+      /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
131
+      /(msie) ([\w.]+)/.exec(ua) ||
132
+      ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
133
+      [];
134
+
135
+    return {
136
+      browser: match[ 1 ] || "",
137
+      version: match[ 2 ] || "0"
138
+    };
139
+  };
140
+  jQuery.browser = {};
141
+  jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
142
+}
143
+
144
+/**
145
+ * Small JavaScript module for the documentation.
146
+ */
147
+var Documentation = {
148
+
149
+  init : function() {
150
+    this.fixFirefoxAnchorBug();
151
+    this.highlightSearchWords();
152
+    this.initIndexTable();
153
+    if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
154
+      this.initOnKeyListeners();
155
+    }
156
+  },
157
+
158
+  /**
159
+   * i18n support
160
+   */
161
+  TRANSLATIONS : {},
162
+  PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
163
+  LOCALE : 'unknown',
164
+
165
+  // gettext and ngettext don't access this so that the functions
166
+  // can safely bound to a different name (_ = Documentation.gettext)
167
+  gettext : function(string) {
168
+    var translated = Documentation.TRANSLATIONS[string];
169
+    if (typeof translated === 'undefined')
170
+      return string;
171
+    return (typeof translated === 'string') ? translated : translated[0];
172
+  },
173
+
174
+  ngettext : function(singular, plural, n) {
175
+    var translated = Documentation.TRANSLATIONS[singular];
176
+    if (typeof translated === 'undefined')
177
+      return (n == 1) ? singular : plural;
178
+    return translated[Documentation.PLURALEXPR(n)];
179
+  },
180
+
181
+  addTranslations : function(catalog) {
182
+    for (var key in catalog.messages)
183
+      this.TRANSLATIONS[key] = catalog.messages[key];
184
+    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
185
+    this.LOCALE = catalog.locale;
186
+  },
187
+
188
+  /**
189
+   * add context elements like header anchor links
190
+   */
191
+  addContextElements : function() {
192
+    $('div[id] > :header:first').each(function() {
193
+      $('<a class="headerlink">\u00B6</a>').
194
+      attr('href', '#' + this.id).
195
+      attr('title', _('Permalink to this headline')).
196
+      appendTo(this);
197
+    });
198
+    $('dt[id]').each(function() {
199
+      $('<a class="headerlink">\u00B6</a>').
200
+      attr('href', '#' + this.id).
201
+      attr('title', _('Permalink to this definition')).
202
+      appendTo(this);
203
+    });
204
+  },
205
+
206
+  /**
207
+   * workaround a firefox stupidity
208
+   * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
209
+   */
210
+  fixFirefoxAnchorBug : function() {
211
+    if (document.location.hash && $.browser.mozilla)
212
+      window.setTimeout(function() {
213
+        document.location.href += '';
214
+      }, 10);
215
+  },
216
+
217
+  /**
218
+   * highlight the search words provided in the url in the text
219
+   */
220
+  highlightSearchWords : function() {
221
+    var params = $.getQueryParameters();
222
+    var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
223
+    if (terms.length) {
224
+      var body = $('div.body');
225
+      if (!body.length) {
226
+        body = $('body');
227
+      }
228
+      window.setTimeout(function() {
229
+        $.each(terms, function() {
230
+          body.highlightText(this.toLowerCase(), 'highlighted');
231
+        });
232
+      }, 10);
233
+      $('<p class="highlight-link"><a href="javascript:Documentation.' +
234
+        'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
235
+          .appendTo($('#searchbox'));
236
+    }
237
+  },
238
+
239
+  /**
240
+   * init the domain index toggle buttons
241
+   */
242
+  initIndexTable : function() {
243
+    var togglers = $('img.toggler').click(function() {
244
+      var src = $(this).attr('src');
245
+      var idnum = $(this).attr('id').substr(7);
246
+      $('tr.cg-' + idnum).toggle();
247
+      if (src.substr(-9) === 'minus.png')
248
+        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
249
+      else
250
+        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
251
+    }).css('display', '');
252
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
253
+        togglers.click();
254
+    }
255
+  },
256
+
257
+  /**
258
+   * helper function to hide the search marks again
259
+   */
260
+  hideSearchWords : function() {
261
+    $('#searchbox .highlight-link').fadeOut(300);
262
+    $('span.highlighted').removeClass('highlighted');
263
+  },
264
+
265
+  /**
266
+   * make the url absolute
267
+   */
268
+  makeURL : function(relativeURL) {
269
+    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
270
+  },
271
+
272
+  /**
273
+   * get the current relative url
274
+   */
275
+  getCurrentURL : function() {
276
+    var path = document.location.pathname;
277
+    var parts = path.split(/\//);
278
+    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
279
+      if (this === '..')
280
+        parts.pop();
281
+    });
282
+    var url = parts.join('/');
283
+    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
284
+  },
285
+
286
+  initOnKeyListeners: function() {
287
+    $(document).keyup(function(event) {
288
+      var activeElementType = document.activeElement.tagName;
289
+      // don't navigate when in search box or textarea
290
+      if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
291
+        switch (event.keyCode) {
292
+          case 37: // left
293
+            var prevHref = $('link[rel="prev"]').prop('href');
294
+            if (prevHref) {
295
+              window.location.href = prevHref;
296
+              return false;
297
+            }
298
+          case 39: // right
299
+            var nextHref = $('link[rel="next"]').prop('href');
300
+            if (nextHref) {
301
+              window.location.href = nextHref;
302
+              return false;
303
+            }
304
+        }
305
+      }
306
+    });
307
+  }
308
+};
309
+
310
+// quick alias for translations
311
+_ = Documentation.gettext;
312
+
313
+$(document).ready(function() {
314
+  Documentation.init();
315
+});

+ 10
- 0
_docs_/_static/documentation_options.js View File

@@ -0,0 +1,10 @@
1
+var DOCUMENTATION_OPTIONS = {
2
+    URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3
+    VERSION: '',
4
+    LANGUAGE: 'None',
5
+    COLLAPSE_INDEX: false,
6
+    FILE_SUFFIX: '.html',
7
+    HAS_SOURCE: true,
8
+    SOURCELINK_SUFFIX: '.txt',
9
+    NAVIGATION_WITH_KEYS: false,
10
+};

BIN
_docs_/_static/file.png View File


BIN
_docs_/_static/fonts/FontAwesome.otf View File


BIN
_docs_/_static/fonts/Lato/lato-bold.eot View File


BIN
_docs_/_static/fonts/Lato/lato-bold.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-bold.woff View File


BIN
_docs_/_static/fonts/Lato/lato-bold.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.eot View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.woff View File


BIN
_docs_/_static/fonts/Lato/lato-bolditalic.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-italic.eot View File


BIN
_docs_/_static/fonts/Lato/lato-italic.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-italic.woff View File


BIN
_docs_/_static/fonts/Lato/lato-italic.woff2 View File


BIN
_docs_/_static/fonts/Lato/lato-regular.eot View File


BIN
_docs_/_static/fonts/Lato/lato-regular.ttf View File


BIN
_docs_/_static/fonts/Lato/lato-regular.woff View File


BIN
_docs_/_static/fonts/Lato/lato-regular.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Bold.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Bold.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Light.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Light.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Regular.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Regular.woff2 View File


BIN
_docs_/_static/fonts/Roboto-Slab-Thin.woff View File


BIN
_docs_/_static/fonts/Roboto-Slab-Thin.woff2 View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff View File


BIN
_docs_/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 View File


BIN
_docs_/_static/fonts/fontawesome-webfont.eot View File


+ 2671
- 0
_docs_/_static/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


BIN
_docs_/_static/fonts/fontawesome-webfont.ttf View File


BIN
_docs_/_static/fonts/fontawesome-webfont.woff View File


BIN
_docs_/_static/fonts/fontawesome-webfont.woff2 View File


BIN
_docs_/_static/fonts/lato-bold-italic.woff View File


BIN
_docs_/_static/fonts/lato-bold-italic.woff2 View File


BIN
_docs_/_static/fonts/lato-bold.woff View File


BIN
_docs_/_static/fonts/lato-bold.woff2 View File


BIN
_docs_/_static/fonts/lato-normal-italic.woff View File


BIN
_docs_/_static/fonts/lato-normal-italic.woff2 View File


BIN
_docs_/_static/fonts/lato-normal.woff View File


BIN
_docs_/_static/fonts/lato-normal.woff2 View File


+ 10365
- 0
_docs_/_static/jquery.js
File diff suppressed because it is too large
View File


+ 1
- 0
_docs_/_static/js/badge_only.js View File

@@ -0,0 +1 @@
1
+!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}});

+ 4
- 0
_docs_/_static/js/html5shiv-printshiv.min.js View File

@@ -0,0 +1,4 @@
1
+/**
2
+* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+*/
4
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document);

+ 4
- 0
_docs_/_static/js/html5shiv.min.js View File

@@ -0,0 +1,4 @@
1
+/**
2
+* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
3
+*/
4
+!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);

+ 4
- 0
_docs_/_static/js/modernizr.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
_docs_/_static/js/theme.js View File

@@ -0,0 +1 @@
1
+!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),n("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),n("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n('<span class="toctree-expand"></span>'),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}t.length>0&&($(".wy-menu-vertical .current").removeClass("current"),t.addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l1").parent().addClass("current"),t.closest("li.toctree-l1").addClass("current"),t.closest("li.toctree-l2").addClass("current"),t.closest("li.toctree-l3").addClass("current"),t.closest("li.toctree-l4").addClass("current"),t.closest("li.toctree-l5").addClass("current"),t[0].scrollIntoView())}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-n)),r=window.setTimeout((function(){e(i+o)}),o);return n=i+o,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()}).call(window)},function(n,e){n.exports=jQuery},function(n,e,t){}]);

+ 297
- 0
_docs_/_static/language_data.js View File

@@ -0,0 +1,297 @@
1
+/*
2
+ * language_data.js
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * This script contains the language-specific data used by searchtools.js,
6
+ * namely the list of stopwords, stemmer, scorer and splitter.
7
+ *
8
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
9
+ * :license: BSD, see LICENSE for details.
10
+ *
11
+ */
12
+
13
+var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
14
+
15
+
16
+/* Non-minified version JS is _stemmer.js if file is provided */ 
17
+/**
18
+ * Porter Stemmer
19
+ */
20
+var Stemmer = function() {
21
+
22
+  var step2list = {
23
+    ational: 'ate',
24
+    tional: 'tion',
25
+    enci: 'ence',
26
+    anci: 'ance',
27
+    izer: 'ize',
28
+    bli: 'ble',
29
+    alli: 'al',
30
+    entli: 'ent',
31
+    eli: 'e',
32
+    ousli: 'ous',
33
+    ization: 'ize',
34
+    ation: 'ate',
35
+    ator: 'ate',
36
+    alism: 'al',
37
+    iveness: 'ive',
38
+    fulness: 'ful',
39
+    ousness: 'ous',
40
+    aliti: 'al',
41
+    iviti: 'ive',
42
+    biliti: 'ble',
43
+    logi: 'log'
44
+  };
45
+
46
+  var step3list = {
47
+    icate: 'ic',
48
+    ative: '',
49
+    alize: 'al',
50
+    iciti: 'ic',
51
+    ical: 'ic',
52
+    ful: '',
53
+    ness: ''
54
+  };
55
+
56
+  var c = "[^aeiou]";          // consonant
57
+  var v = "[aeiouy]";          // vowel
58
+  var C = c + "[^aeiouy]*";    // consonant sequence
59
+  var V = v + "[aeiou]*";      // vowel sequence
60
+
61
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
62
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
63
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
64
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
65
+
66
+  this.stemWord = function (w) {
67
+    var stem;
68
+    var suffix;
69
+    var firstch;
70
+    var origword = w;
71
+
72
+    if (w.length < 3)
73
+      return w;
74
+
75
+    var re;
76
+    var re2;
77
+    var re3;
78
+    var re4;
79
+
80
+    firstch = w.substr(0,1);
81
+    if (firstch == "y")
82
+      w = firstch.toUpperCase() + w.substr(1);
83
+
84
+    // Step 1a
85
+    re = /^(.+?)(ss|i)es$/;
86
+    re2 = /^(.+?)([^s])s$/;
87
+
88
+    if (re.test(w))
89
+      w = w.replace(re,"$1$2");
90
+    else if (re2.test(w))
91
+      w = w.replace(re2,"$1$2");
92
+
93
+    // Step 1b
94
+    re = /^(.+?)eed$/;
95
+    re2 = /^(.+?)(ed|ing)$/;
96
+    if (re.test(w)) {
97
+      var fp = re.exec(w);
98
+      re = new RegExp(mgr0);
99
+      if (re.test(fp[1])) {
100
+        re = /.$/;
101
+        w = w.replace(re,"");
102
+      }
103
+    }
104
+    else if (re2.test(w)) {
105
+      var fp = re2.exec(w);
106
+      stem = fp[1];
107
+      re2 = new RegExp(s_v);
108
+      if (re2.test(stem)) {
109
+        w = stem;
110
+        re2 = /(at|bl|iz)$/;
111
+        re3 = new RegExp("([^aeiouylsz])\\1$");
112
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
113
+        if (re2.test(w))
114
+          w = w + "e";
115
+        else if (re3.test(w)) {
116
+          re = /.$/;
117
+          w = w.replace(re,"");
118
+        }
119
+        else if (re4.test(w))
120
+          w = w + "e";
121
+      }
122
+    }
123
+
124
+    // Step 1c
125
+    re = /^(.+?)y$/;
126
+    if (re.test(w)) {
127
+      var fp = re.exec(w);
128
+      stem = fp[1];
129
+      re = new RegExp(s_v);
130
+      if (re.test(stem))
131
+        w = stem + "i";
132
+    }
133
+
134
+    // Step 2
135
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
136
+    if (re.test(w)) {
137
+      var fp = re.exec(w);
138
+      stem = fp[1];
139
+      suffix = fp[2];
140
+      re = new RegExp(mgr0);
141
+      if (re.test(stem))
142
+        w = stem + step2list[suffix];
143
+    }
144
+
145
+    // Step 3
146
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
147
+    if (re.test(w)) {
148
+      var fp = re.exec(w);
149
+      stem = fp[1];
150
+      suffix = fp[2];
151
+      re = new RegExp(mgr0);
152
+      if (re.test(stem))
153
+        w = stem + step3list[suffix];
154
+    }
155
+
156
+    // Step 4
157
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
158
+    re2 = /^(.+?)(s|t)(ion)$/;
159
+    if (re.test(w)) {
160
+      var fp = re.exec(w);
161
+      stem = fp[1];
162
+      re = new RegExp(mgr1);
163
+      if (re.test(stem))
164
+        w = stem;
165
+    }
166
+    else if (re2.test(w)) {
167
+      var fp = re2.exec(w);
168
+      stem = fp[1] + fp[2];
169
+      re2 = new RegExp(mgr1);
170
+      if (re2.test(stem))
171
+        w = stem;
172
+    }
173
+
174
+    // Step 5
175
+    re = /^(.+?)e$/;
176
+    if (re.test(w)) {
177
+      var fp = re.exec(w);
178
+      stem = fp[1];
179
+      re = new RegExp(mgr1);
180
+      re2 = new RegExp(meq1);
181
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
182
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
183
+        w = stem;
184
+    }
185
+    re = /ll$/;
186
+    re2 = new RegExp(mgr1);
187
+    if (re.test(w) && re2.test(w)) {
188
+      re = /.$/;
189
+      w = w.replace(re,"");
190
+    }
191
+
192
+    // and turn initial Y back to y
193
+    if (firstch == "y")
194
+      w = firstch.toLowerCase() + w.substr(1);
195
+    return w;
196
+  }
197
+}
198
+
199
+
200
+
201
+
202
+
203
+var splitChars = (function() {
204
+    var result = {};
205
+    var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
206
+         1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
207
+         2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
208
+         2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
209
+         3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
210
+         3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
211
+         4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
212
+         8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
213
+         11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
214
+         43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
215
+    var i, j, start, end;
216
+    for (i = 0; i < singles.length; i++) {
217
+        result[singles[i]] = true;
218
+    }
219
+    var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
220
+         [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
221
+         [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
222
+         [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
223
+         [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
224
+         [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
225
+         [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
226
+         [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
227
+         [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
228
+         [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
229
+         [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
230
+         [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
231
+         [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
232
+         [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
233
+         [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
234
+         [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
235
+         [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
236
+         [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
237
+         [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
238
+         [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
239
+         [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
240
+         [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
241
+         [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
242
+         [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
243
+         [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
244
+         [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
245
+         [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
246
+         [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
247
+         [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
248
+         [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
249
+         [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
250
+         [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
251
+         [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
252
+         [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
253
+         [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
254
+         [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
255
+         [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
256
+         [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
257
+         [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
258
+         [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
259
+         [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
260
+         [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
261
+         [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
262
+         [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
263
+         [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
264
+         [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
265
+         [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
266
+         [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
267
+         [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
268
+    for (i = 0; i < ranges.length; i++) {
269
+        start = ranges[i][0];
270
+        end = ranges[i][1];
271
+        for (j = start; j <= end; j++) {
272
+            result[j] = true;
273
+        }
274
+    }
275
+    return result;
276
+})();
277
+
278
+function splitQuery(query) {
279
+    var result = [];
280
+    var start = -1;
281
+    for (var i = 0; i < query.length; i++) {
282
+        if (splitChars[query.charCodeAt(i)]) {
283
+            if (start !== -1) {
284
+                result.push(query.slice(start, i));
285
+                start = -1;
286
+            }
287
+        } else if (start === -1) {
288
+            start = i;
289
+        }
290
+    }
291
+    if (start !== -1) {
292
+        result.push(query.slice(start));
293
+    }
294
+    return result;
295
+}
296
+
297
+

BIN
_docs_/_static/minus.png View File


BIN
_docs_/_static/plus.png View File


+ 69
- 0
_docs_/_static/pygments.css View File

@@ -0,0 +1,69 @@
1
+.highlight .hll { background-color: #ffffcc }
2
+.highlight  { background: #f8f8f8; }
3
+.highlight .c { color: #408080; font-style: italic } /* Comment */
4
+.highlight .err { border: 1px solid #FF0000 } /* Error */
5
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
6
+.highlight .o { color: #666666 } /* Operator */
7
+.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
8
+.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
9
+.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
10
+.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
11
+.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
12
+.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
13
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
14
+.highlight .ge { font-style: italic } /* Generic.Emph */
15
+.highlight .gr { color: #FF0000 } /* Generic.Error */
16
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
17
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
18
+.highlight .go { color: #888888 } /* Generic.Output */
19
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
20
+.highlight .gs { font-weight: bold } /* Generic.Strong */
21
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
22
+.highlight .gt { color: #0044DD } /* Generic.Traceback */
23
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
24
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
25
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
26
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
27
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
28
+.highlight .kt { color: #B00040 } /* Keyword.Type */
29
+.highlight .m { color: #666666 } /* Literal.Number */
30
+.highlight .s { color: #BA2121 } /* Literal.String */
31
+.highlight .na { color: #7D9029 } /* Name.Attribute */
32
+.highlight .nb { color: #008000 } /* Name.Builtin */
33
+.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
34
+.highlight .no { color: #880000 } /* Name.Constant */
35
+.highlight .nd { color: #AA22FF } /* Name.Decorator */
36
+.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
37
+.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
38
+.highlight .nf { color: #0000FF } /* Name.Function */
39
+.highlight .nl { color: #A0A000 } /* Name.Label */
40
+.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
41
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
42
+.highlight .nv { color: #19177C } /* Name.Variable */
43
+.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
44
+.highlight .w { color: #bbbbbb } /* Text.Whitespace */
45
+.highlight .mb { color: #666666 } /* Literal.Number.Bin */
46
+.highlight .mf { color: #666666 } /* Literal.Number.Float */
47
+.highlight .mh { color: #666666 } /* Literal.Number.Hex */
48
+.highlight .mi { color: #666666 } /* Literal.Number.Integer */
49
+.highlight .mo { color: #666666 } /* Literal.Number.Oct */
50
+.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
51
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
52
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
53
+.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
54
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
55
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
56
+.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
57
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
58
+.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
59
+.highlight .sx { color: #008000 } /* Literal.String.Other */
60
+.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
61
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
62
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
63
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
64
+.highlight .fm { color: #0000FF } /* Name.Function.Magic */
65
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
66
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
67
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
68
+.highlight .vm { color: #19177C } /* Name.Variable.Magic */
69
+.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

+ 481
- 0
_docs_/_static/searchtools.js View File

@@ -0,0 +1,481 @@
1
+/*
2
+ * searchtools.js
3
+ * ~~~~~~~~~~~~~~~~
4
+ *
5
+ * Sphinx JavaScript utilities for the full-text search.
6
+ *
7
+ * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8
+ * :license: BSD, see LICENSE for details.
9
+ *
10
+ */
11
+
12
+if (!Scorer) {
13
+  /**
14
+   * Simple result scoring code.
15
+   */
16
+  var Scorer = {
17
+    // Implement the following function to further tweak the score for each result
18
+    // The function takes a result array [filename, title, anchor, descr, score]
19
+    // and returns the new score.
20
+    /*
21
+    score: function(result) {
22
+      return result[4];
23
+    },
24
+    */
25
+
26
+    // query matches the full name of an object
27
+    objNameMatch: 11,
28
+    // or matches in the last dotted part of the object name
29
+    objPartialMatch: 6,
30
+    // Additive scores depending on the priority of the object
31
+    objPrio: {0:  15,   // used to be importantResults
32
+              1:  5,   // used to be objectResults
33
+              2: -5},  // used to be unimportantResults
34
+    //  Used when the priority is not in the mapping.
35
+    objPrioDefault: 0,
36
+
37
+    // query found in title
38
+    title: 15,
39
+    // query found in terms
40
+    term: 5
41
+  };
42
+}
43
+
44
+if (!splitQuery) {
45
+  function splitQuery(query) {
46
+    return query.split(/\s+/);
47
+  }
48
+}
49
+
50
+/**
51
+ * Search Module
52
+ */
53
+var Search = {
54
+
55
+  _index : null,
56
+  _queued_query : null,
57
+  _pulse_status : -1,
58
+
59
+  init : function() {
60
+      var params = $.getQueryParameters();
61
+      if (params.q) {
62
+          var query = params.q[0];
63
+          $('input[name="q"]')[0].value = query;
64
+          this.performSearch(query);
65
+      }
66
+  },
67
+
68
+  loadIndex : function(url) {
69
+    $.ajax({type: "GET", url: url, data: null,
70
+            dataType: "script", cache: true,
71
+            complete: function(jqxhr, textstatus) {
72
+              if (textstatus != "success") {
73
+                document.getElementById("searchindexloader").src = url;
74
+              }
75
+            }});
76
+  },
77
+
78
+  setIndex : function(index) {
79
+    var q;
80
+    this._index = index;
81
+    if ((q = this._queued_query) !== null) {
82
+      this._queued_query = null;
83
+      Search.query(q);
84
+    }
85
+  },
86
+
87
+  hasIndex : function() {
88
+      return this._index !== null;
89
+  },
90
+
91
+  deferQuery : function(query) {
92
+      this._queued_query = query;
93
+  },
94
+
95
+  stopPulse : function() {
96
+      this._pulse_status = 0;
97
+  },
98
+
99
+  startPulse : function() {
100
+    if (this._pulse_status >= 0)
101
+        return;
102
+    function pulse() {
103
+      var i;
104
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
105
+      var dotString = '';
106
+      for (i = 0; i < Search._pulse_status; i++)
107
+        dotString += '.';
108
+      Search.dots.text(dotString);
109
+      if (Search._pulse_status > -1)
110
+        window.setTimeout(pulse, 500);
111
+    }
112
+    pulse();
113
+  },
114
+
115
+  /**
116
+   * perform a search for something (or wait until index is loaded)
117
+   */
118
+  performSearch : function(query) {
119
+    // create the required interface elements
120
+    this.out = $('#search-results');
121
+    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
122
+    this.dots = $('<span></span>').appendTo(this.title);
123
+    this.status = $('<p style="display: none"></p>').appendTo(this.out);
124
+    this.output = $('<ul class="search"/>').appendTo(this.out);
125
+
126
+    $('#search-progress').text(_('Preparing search...'));
127
+    this.startPulse();
128
+
129
+    // index already loaded, the browser was quick!
130
+    if (this.hasIndex())
131
+      this.query(query);
132
+    else
133
+      this.deferQuery(query);
134
+  },
135
+
136
+  /**
137
+   * execute search (requires search index to be loaded)
138
+   */
139
+  query : function(query) {
140
+    var i;
141
+
142
+    // stem the searchterms and add them to the correct list
143
+    var stemmer = new Stemmer();
144
+    var searchterms = [];
145
+    var excluded = [];
146
+    var hlterms = [];
147
+    var tmp = splitQuery(query);
148
+    var objectterms = [];
149
+    for (i = 0; i < tmp.length; i++) {
150
+      if (tmp[i] !== "") {
151
+          objectterms.push(tmp[i].toLowerCase());
152
+      }
153
+
154
+      if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
155
+          tmp[i] === "") {
156
+        // skip this "word"
157
+        continue;
158
+      }
159
+      // stem the word
160
+      var word = stemmer.stemWord(tmp[i].toLowerCase());
161
+      // prevent stemmer from cutting word smaller than two chars
162
+      if(word.length < 3 && tmp[i].length >= 3) {
163
+        word = tmp[i];
164
+      }
165
+      var toAppend;
166
+      // select the correct list
167
+      if (word[0] == '-') {
168
+        toAppend = excluded;
169
+        word = word.substr(1);
170
+      }
171
+      else {
172
+        toAppend = searchterms;
173
+        hlterms.push(tmp[i].toLowerCase());
174
+      }
175
+      // only add if not already in the list
176
+      if (!$u.contains(toAppend, word))
177
+        toAppend.push(word);
178
+    }
179
+    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
180
+
181
+    // console.debug('SEARCH: searching for:');
182
+    // console.info('required: ', searchterms);
183
+    // console.info('excluded: ', excluded);
184
+
185
+    // prepare search
186
+    var terms = this._index.terms;
187
+    var titleterms = this._index.titleterms;
188
+
189
+    // array of [filename, title, anchor, descr, score]
190
+    var results = [];
191
+    $('#search-progress').empty();
192
+
193
+    // lookup as object
194
+    for (i = 0; i < objectterms.length; i++) {
195
+      var others = [].concat(objectterms.slice(0, i),
196
+                             objectterms.slice(i+1, objectterms.length));
197
+      results = results.concat(this.performObjectSearch(objectterms[i], others));
198
+    }
199
+
200
+    // lookup as search terms in fulltext
201
+    results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
202
+
203
+    // let the scorer override scores with a custom scoring function
204
+    if (Scorer.score) {
205
+      for (i = 0; i < results.length; i++)
206
+        results[i][4] = Scorer.score(results[i]);
207
+    }
208
+
209
+    // now sort the results by score (in opposite order of appearance, since the
210
+    // display function below uses pop() to retrieve items) and then
211
+    // alphabetically
212
+    results.sort(function(a, b) {
213
+      var left = a[4];
214
+      var right = b[4];
215
+      if (left > right) {
216
+        return 1;
217
+      } else if (left < right) {
218
+        return -1;
219
+      } else {
220
+        // same score: sort alphabetically
221
+        left = a[1].toLowerCase();
222
+        right = b[1].toLowerCase();
223
+        return (left > right) ? -1 : ((left < right) ? 1 : 0);
224
+      }
225
+    });
226
+
227
+    // for debugging
228
+    //Search.lastresults = results.slice();  // a copy
229
+    //console.info('search results:', Search.lastresults);
230
+
231
+    // print the results
232
+    var resultCount = results.length;
233
+    function displayNextItem() {
234
+      // results left, load the summary and display it
235
+      if (results.length) {
236
+        var item = results.pop();
237
+        var listItem = $('<li style="display:none"></li>');
238
+        if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
239
+          // dirhtml builder
240
+          var dirname = item[0] + '/';
241
+          if (dirname.match(/\/index\/$/)) {
242
+            dirname = dirname.substring(0, dirname.length-6);
243
+          } else if (dirname == 'index/') {
244
+            dirname = '';
245
+          }
246
+          listItem.append($('<a/>').attr('href',
247
+            DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
248
+            highlightstring + item[2]).html(item[1]));
249
+        } else {
250
+          // normal html builders
251
+          listItem.append($('<a/>').attr('href',
252
+            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
253
+            highlightstring + item[2]).html(item[1]));
254
+        }
255
+        if (item[3]) {
256
+          listItem.append($('<span> (' + item[3] + ')</span>'));
257
+          Search.output.append(listItem);
258
+          listItem.slideDown(5, function() {
259
+            displayNextItem();
260
+          });
261
+        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
262
+          var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
263
+          if (suffix === undefined) {
264
+            suffix = '.txt';
265
+          }
266
+          $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
267
+                  dataType: "text",
268
+                  complete: function(jqxhr, textstatus) {
269
+                    var data = jqxhr.responseText;
270
+                    if (data !== '' && data !== undefined) {
271
+                      listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
272
+                    }
273
+                    Search.output.append(listItem);
274
+                    listItem.slideDown(5, function() {
275
+                      displayNextItem();
276
+                    });
277
+                  }});
278
+        } else {
279
+          // no source available, just display title
280
+          Search.output.append(listItem);
281
+          listItem.slideDown(5, function() {
282
+            displayNextItem();
283
+          });
284
+        }
285
+      }
286
+      // search finished, update title and status message
287
+      else {
288
+        Search.stopPulse();
289
+        Search.title.text(_('Search Results'));
290
+        if (!resultCount)
291
+          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
292
+        else
293
+            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
294
+        Search.status.fadeIn(500);
295
+      }
296
+    }
297
+    displayNextItem();
298
+  },
299
+
300
+  /**
301
+   * search for object names
302
+   */
303
+  performObjectSearch : function(object, otherterms) {
304
+    var filenames = this._index.filenames;
305
+    var docnames = this._index.docnames;
306
+    var objects = this._index.objects;
307
+    var objnames = this._index.objnames;
308
+    var titles = this._index.titles;
309
+
310
+    var i;
311
+    var results = [];
312
+
313
+    for (var prefix in objects) {
314
+      for (var name in objects[prefix]) {
315
+        var fullname = (prefix ? prefix + '.' : '') + name;
316
+        if (fullname.toLowerCase().indexOf(object) > -1) {
317
+          var score = 0;
318
+          var parts = fullname.split('.');
319
+          // check for different match types: exact matches of full name or
320
+          // "last name" (i.e. last dotted part)
321
+          if (fullname == object || parts[parts.length - 1] == object) {
322
+            score += Scorer.objNameMatch;
323
+          // matches in last name
324
+          } else if (parts[parts.length - 1].indexOf(object) > -1) {
325
+            score += Scorer.objPartialMatch;
326
+          }
327
+          var match = objects[prefix][name];
328
+          var objname = objnames[match[1]][2];
329
+          var title = titles[match[0]];
330
+          // If more than one term searched for, we require other words to be
331
+          // found in the name/title/description
332
+          if (otherterms.length > 0) {
333
+            var haystack = (prefix + ' ' + name + ' ' +
334
+                            objname + ' ' + title).toLowerCase();
335
+            var allfound = true;
336
+            for (i = 0; i < otherterms.length; i++) {
337
+              if (haystack.indexOf(otherterms[i]) == -1) {
338
+                allfound = false;
339
+                break;
340
+              }
341
+            }
342
+            if (!allfound) {
343
+              continue;
344
+            }
345
+          }
346
+          var descr = objname + _(', in ') + title;
347
+
348
+          var anchor = match[3];
349
+          if (anchor === '')
350
+            anchor = fullname;
351
+          else if (anchor == '-')
352
+            anchor = objnames[match[1]][1] + '-' + fullname;
353
+          // add custom score for some objects according to scorer
354
+          if (Scorer.objPrio.hasOwnProperty(match[2])) {
355
+            score += Scorer.objPrio[match[2]];
356
+          } else {
357
+            score += Scorer.objPrioDefault;
358
+          }
359
+          results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
360
+        }
361
+      }
362
+    }
363
+
364
+    return results;
365
+  },
366
+
367
+  /**
368
+   * search for full-text terms in the index
369
+   */
370
+  performTermsSearch : function(searchterms, excluded, terms, titleterms) {
371
+    var docnames = this._index.docnames;
372
+    var filenames = this._index.filenames;
373
+    var titles = this._index.titles;
374
+
375
+    var i, j, file;
376
+    var fileMap = {};
377
+    var scoreMap = {};
378
+    var results = [];
379
+
380
+    // perform the search on the required terms
381
+    for (i = 0; i < searchterms.length; i++) {
382
+      var word = searchterms[i];
383
+      var files = [];
384
+      var _o = [
385
+        {files: terms[word], score: Scorer.term},
386
+        {files: titleterms[word], score: Scorer.title}
387
+      ];
388
+
389
+      // no match but word was a required one
390
+      if ($u.every(_o, function(o){return o.files === undefined;})) {
391
+        break;
392
+      }
393
+      // found search word in contents
394
+      $u.each(_o, function(o) {
395
+        var _files = o.files;
396
+        if (_files === undefined)
397
+          return
398
+
399
+        if (_files.length === undefined)
400
+          _files = [_files];
401
+        files = files.concat(_files);
402
+
403
+        // set score for the word in each file to Scorer.term
404
+        for (j = 0; j < _files.length; j++) {
405
+          file = _files[j];
406
+          if (!(file in scoreMap))
407
+            scoreMap[file] = {}
408
+          scoreMap[file][word] = o.score;
409
+        }
410
+      });
411
+
412
+      // create the mapping
413
+      for (j = 0; j < files.length; j++) {
414
+        file = files[j];
415
+        if (file in fileMap)
416
+          fileMap[file].push(word);
417
+        else
418
+          fileMap[file] = [word];
419
+      }
420
+    }
421
+
422
+    // now check if the files don't contain excluded terms
423
+    for (file in fileMap) {
424
+      var valid = true;
425
+
426
+      // check if all requirements are matched
427
+      if (fileMap[file].length != searchterms.length)
428
+          continue;
429
+
430
+      // ensure that none of the excluded terms is in the search result
431
+      for (i = 0; i < excluded.length; i++) {
432
+        if (terms[excluded[i]] == file ||
433
+            titleterms[excluded[i]] == file ||
434
+            $u.contains(terms[excluded[i]] || [], file) ||
435
+            $u.contains(titleterms[excluded[i]] || [], file)) {
436
+          valid = false;
437
+          break;
438
+        }
439
+      }
440
+
441
+      // if we have still a valid result we can add it to the result list
442
+      if (valid) {
443
+        // select one (max) score for the file.
444
+        // for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
445
+        var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
446
+        results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
447
+      }
448
+    }
449
+    return results;
450
+  },
451
+
452
+  /**
453
+   * helper function to return a node containing the
454
+   * search summary for a given text. keywords is a list
455
+   * of stemmed words, hlwords is the list of normal, unstemmed
456
+   * words. the first one is used to find the occurrence, the
457
+   * latter for highlighting it.
458
+   */
459
+  makeSearchSummary : function(text, keywords, hlwords) {
460
+    var textLower = text.toLowerCase();
461
+    var start = 0;
462
+    $.each(keywords, function() {
463
+      var i = textLower.indexOf(this.toLowerCase());
464
+      if (i > -1)
465
+        start = i;
466
+    });
467
+    start = Math.max(start - 120, 0);
468
+    var excerpt = ((start > 0) ? '...' : '') +
469
+      $.trim(text.substr(start, 240)) +
470
+      ((start + 240 - text.length) ? '...' : '');
471
+    var rv = $('<div class="context"></div>').text(excerpt);
472
+    $.each(hlwords, function() {
473
+      rv = rv.highlightText(this, 'highlighted');
474
+    });
475
+    return rv;
476
+  }
477
+};
478
+
479
+$(document).ready(function() {
480
+  Search.init();
481
+});

+ 1692
- 0
_docs_/_static/underscore.js
File diff suppressed because it is too large
View File


+ 353
- 0
_docs_/genindex.html View File

@@ -0,0 +1,353 @@
1
+
2
+
3
+
4
+<!DOCTYPE html>
5
+<html class="writer-html4" lang="en" >
6
+<head>
7
+  <meta charset="utf-8">
8
+  
9
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10
+  
11
+  <title>Index &mdash; socket_protocol  documentation</title>
12
+  
13
+
14
+  
15
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
16
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
17
+
18
+  
19
+  
20
+  
21
+  
22
+
23
+  
24
+  <!--[if lt IE 9]>
25
+    <script src="_static/js/html5shiv.min.js"></script>
26
+  <![endif]-->
27
+  
28
+    
29
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
30
+        <script type="text/javascript" src="_static/jquery.js"></script>
31
+        <script type="text/javascript" src="_static/underscore.js"></script>
32
+        <script type="text/javascript" src="_static/doctools.js"></script>
33
+        <script type="text/javascript" src="_static/language_data.js"></script>
34
+    
35
+    <script type="text/javascript" src="_static/js/theme.js"></script>
36
+
37
+    
38
+    <link rel="index" title="Index" href="#" />
39
+    <link rel="search" title="Search" href="search.html" /> 
40
+</head>
41
+
42
+<body class="wy-body-for-nav">
43
+
44
+   
45
+  <div class="wy-grid-for-nav">
46
+    
47
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
48
+      <div class="wy-side-scroll">
49
+        <div class="wy-side-nav-search" >
50
+          
51
+
52
+          
53
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> socket_protocol
54
+          
55
+
56
+          
57
+          </a>
58
+
59
+          
60
+            
61
+            
62
+          
63
+
64
+          
65
+<div role="search">
66
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
67
+    <input type="text" name="q" placeholder="Search docs" />
68
+    <input type="hidden" name="check_keywords" value="yes" />
69
+    <input type="hidden" name="area" value="default" />
70
+  </form>
71
+</div>
72
+
73
+          
74
+        </div>
75
+
76
+        
77
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
78
+          
79
+            
80
+            
81
+              
82
+            
83
+            
84
+              <!-- Local TOC -->
85
+              <div class="local-toc"></div>
86
+            
87
+          
88
+        </div>
89
+        
90
+      </div>
91
+    </nav>
92
+
93
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
94
+
95
+      
96
+      <nav class="wy-nav-top" aria-label="top navigation">
97
+        
98
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
99
+          <a href="index.html">socket_protocol</a>
100
+        
101
+      </nav>
102
+
103
+
104
+      <div class="wy-nav-content">
105
+        
106
+        <div class="rst-content">
107
+        
108
+          
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+<div role="navigation" aria-label="breadcrumbs navigation">
125
+
126
+  <ul class="wy-breadcrumbs">
127
+    
128
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
129
+        
130
+      <li>Index</li>
131
+    
132
+    
133
+      <li class="wy-breadcrumbs-aside">
134
+        
135
+            
136
+        
137
+      </li>
138
+    
139
+  </ul>
140
+
141
+  
142
+  <hr/>
143
+</div>
144
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
145
+           <div itemprop="articleBody">
146
+            
147
+
148
+<h1 id="index">Index</h1>
149
+
150
+<div class="genindex-jumpbox">
151
+ <a href="#A"><strong>A</strong></a>
152
+ | <a href="#C"><strong>C</strong></a>
153
+ | <a href="#D"><strong>D</strong></a>
154
+ | <a href="#G"><strong>G</strong></a>
155
+ | <a href="#I"><strong>I</strong></a>
156
+ | <a href="#P"><strong>P</strong></a>
157
+ | <a href="#R"><strong>R</strong></a>
158
+ | <a href="#S"><strong>S</strong></a>
159
+ 
160
+</div>
161
+<h2 id="A">A</h2>
162
+<table style="width: 100%" class="indextable genindextable"><tr>
163
+  <td style="width: 33%; vertical-align: top;"><ul>
164
+      <li><a href="index.html#socket_protocol.pure_json_protocol.AUTH_STATE__NAMES">AUTH_STATE__NAMES (socket_protocol.pure_json_protocol attribute)</a>
165
+</li>
166
+      <li><a href="index.html#socket_protocol.pure_json_protocol.AUTH_STATE_KEY_TRANSFERRED">AUTH_STATE_KEY_TRANSFERRED (socket_protocol.pure_json_protocol attribute)</a>
167
+</li>
168
+      <li><a href="index.html#socket_protocol.pure_json_protocol.AUTH_STATE_SEED_REQUESTED">AUTH_STATE_SEED_REQUESTED (socket_protocol.pure_json_protocol attribute)</a>
169
+</li>
170
+  </ul></td>
171
+  <td style="width: 33%; vertical-align: top;"><ul>
172
+      <li><a href="index.html#socket_protocol.pure_json_protocol.AUTH_STATE_SEED_TRANSFERRED">AUTH_STATE_SEED_TRANSFERRED (socket_protocol.pure_json_protocol attribute)</a>
173
+</li>
174
+      <li><a href="index.html#socket_protocol.pure_json_protocol.AUTH_STATE_TRUSTED_CLIENT">AUTH_STATE_TRUSTED_CLIENT (socket_protocol.pure_json_protocol attribute)</a>
175
+</li>
176
+      <li><a href="index.html#socket_protocol.pure_json_protocol.AUTH_STATE_UNKNOWN_CLIENT">AUTH_STATE_UNKNOWN_CLIENT (socket_protocol.pure_json_protocol attribute)</a>
177
+</li>
178
+      <li><a href="index.html#socket_protocol.pure_json_protocol.authentificate">authentificate() (socket_protocol.pure_json_protocol method)</a>
179
+</li>
180
+  </ul></td>
181
+</tr></table>
182
+
183
+<h2 id="C">C</h2>
184
+<table style="width: 100%" class="indextable genindextable"><tr>
185
+  <td style="width: 33%; vertical-align: top;"><ul>
186
+      <li><a href="index.html#socket_protocol.pure_json_protocol.check_authentification_state">check_authentification_state() (socket_protocol.pure_json_protocol method)</a>
187
+</li>
188
+  </ul></td>
189
+  <td style="width: 33%; vertical-align: top;"><ul>
190
+      <li><a href="index.html#socket_protocol.pure_json_protocol.connection_established">connection_established() (socket_protocol.pure_json_protocol method)</a>
191
+</li>
192
+  </ul></td>
193
+</tr></table>
194
+
195
+<h2 id="D">D</h2>
196
+<table style="width: 100%" class="indextable genindextable"><tr>
197
+  <td style="width: 33%; vertical-align: top;"><ul>
198
+      <li><a href="index.html#socket_protocol.data_storage">data_storage (class in socket_protocol)</a>
199
+</li>
200
+  </ul></td>
201
+</tr></table>
202
+
203
+<h2 id="G">G</h2>
204
+<table style="width: 100%" class="indextable genindextable"><tr>
205
+  <td style="width: 33%; vertical-align: top;"><ul>
206
+      <li><a href="index.html#socket_protocol.data_storage.get_data">get_data() (socket_protocol.data_storage method)</a>
207
+</li>
208
+      <li><a href="index.html#socket_protocol.data_storage.get_data_id">get_data_id() (socket_protocol.data_storage method)</a>
209
+</li>
210
+  </ul></td>
211
+  <td style="width: 33%; vertical-align: top;"><ul>
212
+      <li><a href="index.html#socket_protocol.data_storage.get_service_id">get_service_id() (socket_protocol.data_storage method)</a>
213
+</li>
214
+      <li><a href="index.html#socket_protocol.data_storage.get_status">get_status() (socket_protocol.data_storage method)</a>
215
+</li>
216
+  </ul></td>
217
+</tr></table>
218
+
219
+<h2 id="I">I</h2>
220
+<table style="width: 100%" class="indextable genindextable"><tr>
221
+  <td style="width: 33%; vertical-align: top;"><ul>
222
+      <li><a href="index.html#socket_protocol.pure_json_protocol.is_connected">is_connected() (socket_protocol.pure_json_protocol method)</a>
223
+</li>
224
+  </ul></td>
225
+</tr></table>
226
+
227
+<h2 id="P">P</h2>
228
+<table style="width: 100%" class="indextable genindextable"><tr>
229
+  <td style="width: 33%; vertical-align: top;"><ul>
230
+      <li><a href="index.html#socket_protocol.pure_json_protocol">pure_json_protocol (class in socket_protocol)</a>
231
+</li>
232
+  </ul></td>
233
+</tr></table>
234
+
235
+<h2 id="R">R</h2>
236
+<table style="width: 100%" class="indextable genindextable"><tr>
237
+  <td style="width: 33%; vertical-align: top;"><ul>
238
+      <li><a href="index.html#socket_protocol.pure_json_protocol.receive">receive() (socket_protocol.pure_json_protocol method)</a>
239
+</li>
240
+  </ul></td>
241
+  <td style="width: 33%; vertical-align: top;"><ul>
242
+      <li><a href="index.html#socket_protocol.pure_json_protocol.reconnect">reconnect() (socket_protocol.pure_json_protocol method)</a>
243
+</li>
244
+      <li><a href="index.html#socket_protocol.pure_json_protocol.register_callback">register_callback() (socket_protocol.pure_json_protocol method)</a>
245
+</li>
246
+  </ul></td>
247
+</tr></table>
248
+
249
+<h2 id="S">S</h2>
250
+<table style="width: 100%" class="indextable genindextable"><tr>
251
+  <td style="width: 33%; vertical-align: top;"><ul>
252
+      <li><a href="index.html#socket_protocol.pure_json_protocol.send">send() (socket_protocol.pure_json_protocol method)</a>
253
+</li>
254
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID__NO_AUTH_LIST">SID__NO_AUTH_LIST (socket_protocol.pure_json_protocol attribute)</a>
255
+</li>
256
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID__RESPONSE_DICT">SID__RESPONSE_DICT (socket_protocol.pure_json_protocol attribute)</a>
257
+</li>
258
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_AUTH_KEY_CHECK_REQUEST">SID_AUTH_KEY_CHECK_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
259
+</li>
260
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_AUTH_KEY_CHECK_RESPONSE">SID_AUTH_KEY_CHECK_RESPONSE (socket_protocol.pure_json_protocol attribute)</a>
261
+</li>
262
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_AUTH_KEY_REQUEST">SID_AUTH_KEY_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
263
+</li>
264
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_AUTH_SEED_REQUEST">SID_AUTH_SEED_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
265
+</li>
266
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_CHANNEL_NAME_REQUEST">SID_CHANNEL_NAME_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
267
+</li>
268
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_CHANNEL_NAME_RESPONSE">SID_CHANNEL_NAME_RESPONSE (socket_protocol.pure_json_protocol attribute)</a>
269
+</li>
270
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_EXECUTE_REQUEST">SID_EXECUTE_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
271
+</li>
272
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_EXECUTE_RESPONSE">SID_EXECUTE_RESPONSE (socket_protocol.pure_json_protocol attribute)</a>
273
+</li>
274
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_READ_REQUEST">SID_READ_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
275
+</li>
276
+  </ul></td>
277
+  <td style="width: 33%; vertical-align: top;"><ul>
278
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_READ_RESPONSE">SID_READ_RESPONSE (socket_protocol.pure_json_protocol attribute)</a>
279
+</li>
280
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_WRITE_REQUEST">SID_WRITE_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
281
+</li>
282
+      <li><a href="index.html#socket_protocol.pure_json_protocol.SID_WRITE_RESPONSE">SID_WRITE_RESPONSE (socket_protocol.pure_json_protocol attribute)</a>
283
+</li>
284
+      <li><a href="index.html#module-socket_protocol">socket_protocol (module)</a>
285
+</li>
286
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS__NAMES">STATUS__NAMES (socket_protocol.pure_json_protocol attribute)</a>
287
+</li>
288
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS_AUTH_REQUIRED">STATUS_AUTH_REQUIRED (socket_protocol.pure_json_protocol attribute)</a>
289
+</li>
290
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS_BUFFERING_UNHANDLED_REQUEST">STATUS_BUFFERING_UNHANDLED_REQUEST (socket_protocol.pure_json_protocol attribute)</a>
291
+</li>
292
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS_CHECKSUM_ERROR">STATUS_CHECKSUM_ERROR (socket_protocol.pure_json_protocol attribute)</a>
293
+</li>
294
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS_OKAY">STATUS_OKAY (socket_protocol.pure_json_protocol attribute)</a>
295
+</li>
296
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS_OPERATION_NOT_PERMITTED">STATUS_OPERATION_NOT_PERMITTED (socket_protocol.pure_json_protocol attribute)</a>
297
+</li>
298
+      <li><a href="index.html#socket_protocol.pure_json_protocol.STATUS_SERVICE_OR_DATA_UNKNOWN">STATUS_SERVICE_OR_DATA_UNKNOWN (socket_protocol.pure_json_protocol attribute)</a>
299
+</li>
300
+      <li><a href="index.html#socket_protocol.struct_json_protocol">struct_json_protocol (class in socket_protocol)</a>
301
+</li>
302
+  </ul></td>
303
+</tr></table>
304
+
305
+
306
+
307
+           </div>
308
+           
309
+          </div>
310
+          <footer>
311
+  
312
+
313
+  <hr/>
314
+
315
+  <div role="contentinfo">
316
+    <p>
317
+        
318
+        &copy; Copyright 2021, Dirk Alders
319
+
320
+    </p>
321
+  </div>
322
+    
323
+    
324
+    
325
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
326
+    
327
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
328
+    
329
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
330
+
331
+</footer>
332
+
333
+        </div>
334
+      </div>
335
+
336
+    </section>
337
+
338
+  </div>
339
+  
340
+
341
+  <script type="text/javascript">
342
+      jQuery(function () {
343
+          SphinxRtdTheme.Navigation.enable(true);
344
+      });
345
+  </script>
346
+
347
+  
348
+  
349
+    
350
+   
351
+
352
+</body>
353
+</html>

+ 722
- 0
_docs_/index.html View File

@@ -0,0 +1,722 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Welcome to socket_protocol’s documentation! &mdash; socket_protocol  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+  <!--[if lt IE 9]>
24
+    <script src="_static/js/html5shiv.min.js"></script>
25
+  <![endif]-->
26
+  
27
+    
28
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
29
+        <script type="text/javascript" src="_static/jquery.js"></script>
30
+        <script type="text/javascript" src="_static/underscore.js"></script>
31
+        <script type="text/javascript" src="_static/doctools.js"></script>
32
+        <script type="text/javascript" src="_static/language_data.js"></script>
33
+    
34
+    <script type="text/javascript" src="_static/js/theme.js"></script>
35
+
36
+    
37
+    <link rel="index" title="Index" href="genindex.html" />
38
+    <link rel="search" title="Search" href="search.html" /> 
39
+</head>
40
+
41
+<body class="wy-body-for-nav">
42
+
43
+   
44
+  <div class="wy-grid-for-nav">
45
+    
46
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
47
+      <div class="wy-side-scroll">
48
+        <div class="wy-side-nav-search" >
49
+          
50
+
51
+          
52
+            <a href="#" class="icon icon-home" alt="Documentation Home"> socket_protocol
53
+          
54
+
55
+          
56
+          </a>
57
+
58
+          
59
+            
60
+            
61
+          
62
+
63
+          
64
+<div role="search">
65
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
66
+    <input type="text" name="q" placeholder="Search docs" />
67
+    <input type="hidden" name="check_keywords" value="yes" />
68
+    <input type="hidden" name="area" value="default" />
69
+  </form>
70
+</div>
71
+
72
+          
73
+        </div>
74
+
75
+        
76
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
77
+          
78
+            
79
+            
80
+              
81
+            
82
+            
83
+              <!-- Local TOC -->
84
+              <div class="local-toc"><ul>
85
+<li><a class="reference internal" href="#">Welcome to socket_protocol’s documentation!</a><ul>
86
+<li><a class="reference internal" href="#socket-protocol-socket-protocol">socket_protocol (Socket Protocol)</a></li>
87
+</ul>
88
+</li>
89
+<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
90
+</ul>
91
+</div>
92
+            
93
+          
94
+        </div>
95
+        
96
+      </div>
97
+    </nav>
98
+
99
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
100
+
101
+      
102
+      <nav class="wy-nav-top" aria-label="top navigation">
103
+        
104
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
105
+          <a href="#">socket_protocol</a>
106
+        
107
+      </nav>
108
+
109
+
110
+      <div class="wy-nav-content">
111
+        
112
+        <div class="rst-content">
113
+        
114
+          
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+<div role="navigation" aria-label="breadcrumbs navigation">
131
+
132
+  <ul class="wy-breadcrumbs">
133
+    
134
+      <li><a href="#" class="icon icon-home"></a> &raquo;</li>
135
+        
136
+      <li>Welcome to socket_protocol’s documentation!</li>
137
+    
138
+    
139
+      <li class="wy-breadcrumbs-aside">
140
+        
141
+            
142
+            <a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
143
+          
144
+        
145
+      </li>
146
+    
147
+  </ul>
148
+
149
+  
150
+  <hr/>
151
+</div>
152
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
153
+           <div itemprop="articleBody">
154
+            
155
+  <div class="section" id="module-socket_protocol">
156
+<span id="welcome-to-socket-protocol-s-documentation"></span><h1>Welcome to socket_protocol’s documentation!<a class="headerlink" href="#module-socket_protocol" title="Permalink to this headline">¶</a></h1>
157
+<div class="section" id="socket-protocol-socket-protocol">
158
+<h2>socket_protocol (Socket Protocol)<a class="headerlink" href="#socket-protocol-socket-protocol" title="Permalink to this headline">¶</a></h2>
159
+<p><strong>Author:</strong></p>
160
+<ul class="simple">
161
+<li>Dirk Alders &lt;<a class="reference external" href="mailto:sudo-dirk&#37;&#52;&#48;mount-mockery&#46;de">sudo-dirk<span>&#64;</span>mount-mockery<span>&#46;</span>de</a>&gt;</li>
162
+</ul>
163
+<p><strong>Description:</strong></p>
164
+<blockquote>
165
+<div>This Module supports point to point communication for client-server issues.</div></blockquote>
166
+<p><strong>Submodules:</strong></p>
167
+<ul class="simple">
168
+<li><a class="reference internal" href="#socket_protocol.pure_json_protocol" title="socket_protocol.pure_json_protocol"><code class="xref py py-class docutils literal notranslate"><span class="pre">socket_protocol.pure_json_protocol</span></code></a></li>
169
+<li><a class="reference internal" href="#socket_protocol.struct_json_protocol" title="socket_protocol.struct_json_protocol"><code class="xref py py-class docutils literal notranslate"><span class="pre">socket_protocol.struct_json_protocol</span></code></a></li>
170
+</ul>
171
+<p><strong>Unittest:</strong></p>
172
+<blockquote>
173
+<div>See also the <a class="reference download internal" download="" href="_downloads/f482679fb1771f4d05403bb87fd0cc34/unittest.pdf"><code class="xref download docutils literal notranslate"><span class="pre">unittest</span></code></a> documentation.</div></blockquote>
174
+<p><strong>Module Documentation:</strong></p>
175
+<dl class="class">
176
+<dt id="socket_protocol.data_storage">
177
+<em class="property">class </em><code class="descclassname">socket_protocol.</code><code class="descname">data_storage</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.data_storage" title="Permalink to this definition">¶</a></dt>
178
+<dd><table class="docutils field-list" frame="void" rules="none">
179
+<col class="field-name" />
180
+<col class="field-body" />
181
+<tbody valign="top">
182
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
183
+<li><strong>status</strong> (<em>int</em>) – The message status.</li>
184
+<li><strong>service_id</strong> (<em>int</em>) – The Service-ID.</li>
185
+<li><strong>data_id</strong> (<em>int</em>) – The Data-ID.</li>
186
+<li><strong>data</strong> (<em>any</em>) – The transfered data.</li>
187
+</ul>
188
+</td>
189
+</tr>
190
+</tbody>
191
+</table>
192
+<p>This is a storage object for socket_protocol messages.</p>
193
+<dl class="method">
194
+<dt id="socket_protocol.data_storage.get_data">
195
+<code class="descname">get_data</code><span class="sig-paren">(</span><em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.data_storage.get_data" title="Permalink to this definition">¶</a></dt>
196
+<dd><table class="docutils field-list" frame="void" rules="none">
197
+<col class="field-name" />
198
+<col class="field-body" />
199
+<tbody valign="top">
200
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>default</strong> – The default value, if no data is available.</td>
201
+</tr>
202
+</tbody>
203
+</table>
204
+<p>This Method returns the message data.</p>
205
+</dd></dl>
206
+
207
+<dl class="method">
208
+<dt id="socket_protocol.data_storage.get_data_id">
209
+<code class="descname">get_data_id</code><span class="sig-paren">(</span><em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.data_storage.get_data_id" title="Permalink to this definition">¶</a></dt>
210
+<dd><table class="docutils field-list" frame="void" rules="none">
211
+<col class="field-name" />
212
+<col class="field-body" />
213
+<tbody valign="top">
214
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>default</strong> – The default value, if no data is available.</td>
215
+</tr>
216
+</tbody>
217
+</table>
218
+<p>This Method returns the message Data-ID.</p>
219
+</dd></dl>
220
+
221
+<dl class="method">
222
+<dt id="socket_protocol.data_storage.get_service_id">
223
+<code class="descname">get_service_id</code><span class="sig-paren">(</span><em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.data_storage.get_service_id" title="Permalink to this definition">¶</a></dt>
224
+<dd><table class="docutils field-list" frame="void" rules="none">
225
+<col class="field-name" />
226
+<col class="field-body" />
227
+<tbody valign="top">
228
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>default</strong> – The default value, if no data is available.</td>
229
+</tr>
230
+</tbody>
231
+</table>
232
+<p>This Method returns the message Service-ID.</p>
233
+</dd></dl>
234
+
235
+<dl class="method">
236
+<dt id="socket_protocol.data_storage.get_status">
237
+<code class="descname">get_status</code><span class="sig-paren">(</span><em>default=None</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.data_storage.get_status" title="Permalink to this definition">¶</a></dt>
238
+<dd><table class="docutils field-list" frame="void" rules="none">
239
+<col class="field-name" />
240
+<col class="field-body" />
241
+<tbody valign="top">
242
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>default</strong> – The default value, if no data is available.</td>
243
+</tr>
244
+</tbody>
245
+</table>
246
+<p>This Method returns the message status.</p>
247
+</dd></dl>
248
+
249
+</dd></dl>
250
+
251
+<dl class="class">
252
+<dt id="socket_protocol.pure_json_protocol">
253
+<em class="property">class </em><code class="descclassname">socket_protocol.</code><code class="descname">pure_json_protocol</code><span class="sig-paren">(</span><em>comm_instance</em>, <em>secret=None</em>, <em>auto_auth=False</em>, <em>channel_name=None</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol" title="Permalink to this definition">¶</a></dt>
254
+<dd><table class="docutils field-list" frame="void" rules="none">
255
+<col class="field-name" />
256
+<col class="field-body" />
257
+<tbody valign="top">
258
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
259
+<li><strong>comm_instance</strong> (<em>instance</em>) – A communication instance.</li>
260
+<li><strong>secret</strong> (<em>str</em>) – An optinal secret (e.g. created by <code class="docutils literal notranslate"><span class="pre">binascii.hexlify(os.urandom(24))</span></code>).</li>
261
+<li><strong>auto_auth</strong> (<em>bool</em>) – An optional parameter (True) to enable automatic authentification, otherwise you need to do it manually, if needed.</li>
262
+<li><strong>channel_name</strong> (<em>str</em>) – An optional parameter to set a channel name for logging of the communication.</li>
263
+</ul>
264
+</td>
265
+</tr>
266
+</tbody>
267
+</table>
268
+<div class="admonition hint">
269
+<p class="first admonition-title">Hint</p>
270
+<p>This <cite>class</cite> supports to transfer a Service-ID, Data-ID and Data.</p>
271
+<ul class="last simple">
272
+<li>The Service-ID is designed to identify the type of the communication (e.g. READ_REQUEST, WRITE_REQUEST, READ_RESPONSE, WRITE_RESPONSE, …)</li>
273
+<li>The Data-ID is designed to identify the requests / responses using the same Service_ID.</li>
274
+</ul>
275
+</div>
276
+<div class="admonition note">
277
+<p class="first admonition-title">Note</p>
278
+<p>The <code class="xref py py-class docutils literal notranslate"><span class="pre">comm_instance</span></code> needs to have at least the following interface:</p>
279
+<ul class="last simple">
280
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.init_channel_name()</span></code> to set the channel name if needed.</li>
281
+<li>A Constant <code class="xref py py-const docutils literal notranslate"><span class="pre">comm_instance.IS_CLIENT</span></code> to identify that the <code class="xref py py-class docutils literal notranslate"><span class="pre">comm_instance</span></code> is a client (True) or a server (False).</li>
282
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.is_connected()</span></code> to identify if the instance is connected (True) or not (False).</li>
283
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.reconnect()</span></code> to initiate a reconnect.</li>
284
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.register_callback()</span></code> to register a data available callback.</li>
285
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.register_connect_callback()</span></code> to register a connect callback.</li>
286
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.register_disconnect_callback()</span></code> to register a disconnect callback.</li>
287
+<li>A Method <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.send()</span></code> to send data via the <code class="xref py py-class docutils literal notranslate"><span class="pre">comm_instance</span></code>.</li>
288
+</ul>
289
+</div>
290
+<div class="admonition note">
291
+<p class="first admonition-title">Note</p>
292
+<p class="last">The parameter <code class="xref py py-const docutils literal notranslate"><span class="pre">auto_auth</span></code> is only relevant, if a secret is given and the <code class="xref py py-class docutils literal notranslate"><span class="pre">comm_instance</span></code> is a client. The authentification is initiated directly after the connection is established.</p>
293
+</div>
294
+<div class="admonition note">
295
+<p class="first admonition-title">Note</p>
296
+<p>The <code class="xref py py-const docutils literal notranslate"><span class="pre">channel_name</span></code>-exchange will be initiated by the client directly after the the connection is established.</p>
297
+<ul class="last simple">
298
+<li>If a channel_name is given at both communication sides and they are different, the client name is taken over and the server will log a warning message.</li>
299
+</ul>
300
+</div>
301
+<dl class="attribute">
302
+<dt id="socket_protocol.pure_json_protocol.AUTH_STATE_KEY_TRANSFERRED">
303
+<code class="descname">AUTH_STATE_KEY_TRANSFERRED</code><em class="property"> = 3</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.AUTH_STATE_KEY_TRANSFERRED" title="Permalink to this definition">¶</a></dt>
304
+<dd><p>Authentification Status for ‘Key has been sent’</p>
305
+</dd></dl>
306
+
307
+<dl class="attribute">
308
+<dt id="socket_protocol.pure_json_protocol.AUTH_STATE_SEED_REQUESTED">
309
+<code class="descname">AUTH_STATE_SEED_REQUESTED</code><em class="property"> = 1</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.AUTH_STATE_SEED_REQUESTED" title="Permalink to this definition">¶</a></dt>
310
+<dd><p>Authentification Status for ‘Seed was requested’</p>
311
+</dd></dl>
312
+
313
+<dl class="attribute">
314
+<dt id="socket_protocol.pure_json_protocol.AUTH_STATE_SEED_TRANSFERRED">
315
+<code class="descname">AUTH_STATE_SEED_TRANSFERRED</code><em class="property"> = 2</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.AUTH_STATE_SEED_TRANSFERRED" title="Permalink to this definition">¶</a></dt>
316
+<dd><p>Authentification Status for ‘Seed has been sent’</p>
317
+</dd></dl>
318
+
319
+<dl class="attribute">
320
+<dt id="socket_protocol.pure_json_protocol.AUTH_STATE_TRUSTED_CLIENT">
321
+<code class="descname">AUTH_STATE_TRUSTED_CLIENT</code><em class="property"> = 4</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.AUTH_STATE_TRUSTED_CLIENT" title="Permalink to this definition">¶</a></dt>
322
+<dd><p>Authentification Status for ‘Trusted Connection’</p>
323
+</dd></dl>
324
+
325
+<dl class="attribute">
326
+<dt id="socket_protocol.pure_json_protocol.AUTH_STATE_UNKNOWN_CLIENT">
327
+<code class="descname">AUTH_STATE_UNKNOWN_CLIENT</code><em class="property"> = 0</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.AUTH_STATE_UNKNOWN_CLIENT" title="Permalink to this definition">¶</a></dt>
328
+<dd><p>Authentification Status for ‘Unknown Client’</p>
329
+</dd></dl>
330
+
331
+<dl class="attribute">
332
+<dt id="socket_protocol.pure_json_protocol.AUTH_STATE__NAMES">
333
+<code class="descname">AUTH_STATE__NAMES</code><em class="property"> = {0: 'Unknown Client', 1: 'Seed was requested', 2: 'Seed has been sent', 3: 'Key has been sent', 4: 'Trusted Connection'}</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.AUTH_STATE__NAMES" title="Permalink to this definition">¶</a></dt>
334
+<dd><p>Authentification Status names for previous defined authentification states</p>
335
+</dd></dl>
336
+
337
+<dl class="attribute">
338
+<dt id="socket_protocol.pure_json_protocol.SID_AUTH_KEY_CHECK_REQUEST">
339
+<code class="descname">SID_AUTH_KEY_CHECK_REQUEST</code><em class="property"> = 3</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_AUTH_KEY_CHECK_REQUEST" title="Permalink to this definition">¶</a></dt>
340
+<dd><p>SID for request for checking a key</p>
341
+</dd></dl>
342
+
343
+<dl class="attribute">
344
+<dt id="socket_protocol.pure_json_protocol.SID_AUTH_KEY_CHECK_RESPONSE">
345
+<code class="descname">SID_AUTH_KEY_CHECK_RESPONSE</code><em class="property"> = 4</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_AUTH_KEY_CHECK_RESPONSE" title="Permalink to this definition">¶</a></dt>
346
+<dd><p>SID for the authentification response</p>
347
+</dd></dl>
348
+
349
+<dl class="attribute">
350
+<dt id="socket_protocol.pure_json_protocol.SID_AUTH_KEY_REQUEST">
351
+<code class="descname">SID_AUTH_KEY_REQUEST</code><em class="property"> = 2</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_AUTH_KEY_REQUEST" title="Permalink to this definition">¶</a></dt>
352
+<dd><p>SID for requesting a key for the given seed</p>
353
+</dd></dl>
354
+
355
+<dl class="attribute">
356
+<dt id="socket_protocol.pure_json_protocol.SID_AUTH_SEED_REQUEST">
357
+<code class="descname">SID_AUTH_SEED_REQUEST</code><em class="property"> = 1</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_AUTH_SEED_REQUEST" title="Permalink to this definition">¶</a></dt>
358
+<dd><p>SID for requesting a seed for authentification</p>
359
+</dd></dl>
360
+
361
+<dl class="attribute">
362
+<dt id="socket_protocol.pure_json_protocol.SID_CHANNEL_NAME_REQUEST">
363
+<code class="descname">SID_CHANNEL_NAME_REQUEST</code><em class="property"> = 5</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_CHANNEL_NAME_REQUEST" title="Permalink to this definition">¶</a></dt>
364
+<dd><p>SID for requesting a channel name exchange</p>
365
+</dd></dl>
366
+
367
+<dl class="attribute">
368
+<dt id="socket_protocol.pure_json_protocol.SID_CHANNEL_NAME_RESPONSE">
369
+<code class="descname">SID_CHANNEL_NAME_RESPONSE</code><em class="property"> = 6</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_CHANNEL_NAME_RESPONSE" title="Permalink to this definition">¶</a></dt>
370
+<dd><p>SID for the channel name response</p>
371
+</dd></dl>
372
+
373
+<dl class="attribute">
374
+<dt id="socket_protocol.pure_json_protocol.SID_EXECUTE_REQUEST">
375
+<code class="descname">SID_EXECUTE_REQUEST</code><em class="property"> = 30</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_EXECUTE_REQUEST" title="Permalink to this definition">¶</a></dt>
376
+<dd><p>SID for a execute request</p>
377
+</dd></dl>
378
+
379
+<dl class="attribute">
380
+<dt id="socket_protocol.pure_json_protocol.SID_EXECUTE_RESPONSE">
381
+<code class="descname">SID_EXECUTE_RESPONSE</code><em class="property"> = 31</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_EXECUTE_RESPONSE" title="Permalink to this definition">¶</a></dt>
382
+<dd><p>SID for a execute response</p>
383
+</dd></dl>
384
+
385
+<dl class="attribute">
386
+<dt id="socket_protocol.pure_json_protocol.SID_READ_REQUEST">
387
+<code class="descname">SID_READ_REQUEST</code><em class="property"> = 10</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_READ_REQUEST" title="Permalink to this definition">¶</a></dt>
388
+<dd><p>SID for a read data request</p>
389
+</dd></dl>
390
+
391
+<dl class="attribute">
392
+<dt id="socket_protocol.pure_json_protocol.SID_READ_RESPONSE">
393
+<code class="descname">SID_READ_RESPONSE</code><em class="property"> = 11</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_READ_RESPONSE" title="Permalink to this definition">¶</a></dt>
394
+<dd><p>SID for read data response</p>
395
+</dd></dl>
396
+
397
+<dl class="attribute">
398
+<dt id="socket_protocol.pure_json_protocol.SID_WRITE_REQUEST">
399
+<code class="descname">SID_WRITE_REQUEST</code><em class="property"> = 20</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_WRITE_REQUEST" title="Permalink to this definition">¶</a></dt>
400
+<dd><p>SID for a write data request</p>
401
+</dd></dl>
402
+
403
+<dl class="attribute">
404
+<dt id="socket_protocol.pure_json_protocol.SID_WRITE_RESPONSE">
405
+<code class="descname">SID_WRITE_RESPONSE</code><em class="property"> = 21</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID_WRITE_RESPONSE" title="Permalink to this definition">¶</a></dt>
406
+<dd><p>SID for a write data response</p>
407
+</dd></dl>
408
+
409
+<dl class="attribute">
410
+<dt id="socket_protocol.pure_json_protocol.SID__NO_AUTH_LIST">
411
+<code class="descname">SID__NO_AUTH_LIST</code><em class="property"> = [1, 2, 3, 4, 5, 6]</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID__NO_AUTH_LIST" title="Permalink to this definition">¶</a></dt>
412
+<dd><p>List of SIDs without need of an authentification</p>
413
+</dd></dl>
414
+
415
+<dl class="attribute">
416
+<dt id="socket_protocol.pure_json_protocol.SID__RESPONSE_DICT">
417
+<code class="descname">SID__RESPONSE_DICT</code><em class="property"> = {1: 2, 2: 3, 3: 4, 5: 6, 10: 11, 20: 21, 30: 31}</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.SID__RESPONSE_DICT" title="Permalink to this definition">¶</a></dt>
418
+<dd><p>Dictionary to get the SID for the response by the key which is the SID for the request</p>
419
+</dd></dl>
420
+
421
+<dl class="attribute">
422
+<dt id="socket_protocol.pure_json_protocol.STATUS_AUTH_REQUIRED">
423
+<code class="descname">STATUS_AUTH_REQUIRED</code><em class="property"> = 2</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS_AUTH_REQUIRED" title="Permalink to this definition">¶</a></dt>
424
+<dd><p>Status for ‘authentification is required’</p>
425
+</dd></dl>
426
+
427
+<dl class="attribute">
428
+<dt id="socket_protocol.pure_json_protocol.STATUS_BUFFERING_UNHANDLED_REQUEST">
429
+<code class="descname">STATUS_BUFFERING_UNHANDLED_REQUEST</code><em class="property"> = 1</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS_BUFFERING_UNHANDLED_REQUEST" title="Permalink to this definition">¶</a></dt>
430
+<dd><p>Status for ‘unhandled request’</p>
431
+</dd></dl>
432
+
433
+<dl class="attribute">
434
+<dt id="socket_protocol.pure_json_protocol.STATUS_CHECKSUM_ERROR">
435
+<code class="descname">STATUS_CHECKSUM_ERROR</code><em class="property"> = 4</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS_CHECKSUM_ERROR" title="Permalink to this definition">¶</a></dt>
436
+<dd><p>Status for ‘checksum error’</p>
437
+</dd></dl>
438
+
439
+<dl class="attribute">
440
+<dt id="socket_protocol.pure_json_protocol.STATUS_OKAY">
441
+<code class="descname">STATUS_OKAY</code><em class="property"> = 0</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS_OKAY" title="Permalink to this definition">¶</a></dt>
442
+<dd><p>Status for ‘okay’</p>
443
+</dd></dl>
444
+
445
+<dl class="attribute">
446
+<dt id="socket_protocol.pure_json_protocol.STATUS_OPERATION_NOT_PERMITTED">
447
+<code class="descname">STATUS_OPERATION_NOT_PERMITTED</code><em class="property"> = 5</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS_OPERATION_NOT_PERMITTED" title="Permalink to this definition">¶</a></dt>
448
+<dd><p>Status for ‘operation not permitted’</p>
449
+</dd></dl>
450
+
451
+<dl class="attribute">
452
+<dt id="socket_protocol.pure_json_protocol.STATUS_SERVICE_OR_DATA_UNKNOWN">
453
+<code class="descname">STATUS_SERVICE_OR_DATA_UNKNOWN</code><em class="property"> = 3</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS_SERVICE_OR_DATA_UNKNOWN" title="Permalink to this definition">¶</a></dt>
454
+<dd><p>Status for ‘service or data unknown’</p>
455
+</dd></dl>
456
+
457
+<dl class="attribute">
458
+<dt id="socket_protocol.pure_json_protocol.STATUS__NAMES">
459
+<code class="descname">STATUS__NAMES</code><em class="property"> = {0: 'Okay', 1: 'Request has no callback. Data buffered.', 2: 'Authentification required', 3: 'Service or Data unknown', 4: 'Checksum Error', 5: 'Operation not permitted'}</em><a class="headerlink" href="#socket_protocol.pure_json_protocol.STATUS__NAMES" title="Permalink to this definition">¶</a></dt>
460
+<dd><p>Status names for previous defined states</p>
461
+</dd></dl>
462
+
463
+<dl class="method">
464
+<dt id="socket_protocol.pure_json_protocol.authentificate">
465
+<code class="descname">authentificate</code><span class="sig-paren">(</span><em>timeout=2</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.authentificate" title="Permalink to this definition">¶</a></dt>
466
+<dd><table class="docutils field-list" frame="void" rules="none">
467
+<col class="field-name" />
468
+<col class="field-body" />
469
+<tbody valign="top">
470
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>timeout</strong> (<em>float</em>) – The timeout for the authentification (requesting seed, sending key and getting authentification_feedback).</td>
471
+</tr>
472
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True, if authentification was successfull; False, if not.</td>
473
+</tr>
474
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
475
+</tr>
476
+</tbody>
477
+</table>
478
+<p>This method authetificates the client at the server.</p>
479
+<div class="admonition note">
480
+<p class="first admonition-title">Note</p>
481
+<p class="last">An authentification will only processed, if a secret had been given on initialisation.</p>
482
+</div>
483
+<div class="admonition note">
484
+<p class="first admonition-title">Note</p>
485
+<p class="last">Client and Server needs to use the same secret.</p>
486
+</div>
487
+</dd></dl>
488
+
489
+<dl class="method">
490
+<dt id="socket_protocol.pure_json_protocol.check_authentification_state">
491
+<code class="descname">check_authentification_state</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.check_authentification_state" title="Permalink to this definition">¶</a></dt>
492
+<dd><table class="docutils field-list" frame="void" rules="none">
493
+<col class="field-name" />
494
+<col class="field-body" />
495
+<tbody valign="top">
496
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if authentification state is okay, otherwise False</td>
497
+</tr>
498
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
499
+</tr>
500
+</tbody>
501
+</table>
502
+</dd></dl>
503
+
504
+<dl class="method">
505
+<dt id="socket_protocol.pure_json_protocol.connection_established">
506
+<code class="descname">connection_established</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.connection_established" title="Permalink to this definition">¶</a></dt>
507
+<dd><table class="docutils field-list" frame="void" rules="none">
508
+<col class="field-name" />
509
+<col class="field-body" />
510
+<tbody valign="top">
511
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True, if the connection is established (incl. authentification, if a secret has been given)</td>
512
+</tr>
513
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
514
+</tr>
515
+</tbody>
516
+</table>
517
+</dd></dl>
518
+
519
+<dl class="method">
520
+<dt id="socket_protocol.pure_json_protocol.is_connected">
521
+<code class="descname">is_connected</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.is_connected" title="Permalink to this definition">¶</a></dt>
522
+<dd><table class="docutils field-list" frame="void" rules="none">
523
+<col class="field-name" />
524
+<col class="field-body" />
525
+<tbody valign="top">
526
+<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the <code class="xref py py-class docutils literal notranslate"><span class="pre">comm_instance</span></code> is connected, otherwise False..</td>
527
+</tr>
528
+<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
529
+</tr>
530
+</tbody>
531
+</table>
532
+<p>This methods returns the return value of <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.is_connected()</span></code>.</p>
533
+</dd></dl>
534
+
535
+<dl class="method">
536
+<dt id="socket_protocol.pure_json_protocol.receive">
537
+<code class="descname">receive</code><span class="sig-paren">(</span><em>service_id</em>, <em>data_id</em>, <em>timeout=1</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.receive" title="Permalink to this definition">¶</a></dt>
538
+<dd><table class="docutils field-list" frame="void" rules="none">
539
+<col class="field-name" />
540
+<col class="field-body" />
541
+<tbody valign="top">
542
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
543
+<li><strong>service_id</strong> (<em>int</em>) – The Service-ID for the message. See class definitions starting with <code class="docutils literal notranslate"><span class="pre">SID_</span></code>.</li>
544
+<li><strong>data_id</strong> (<em>int</em>) – The Data-ID for the message.</li>
545
+<li><strong>timeout</strong> (<em>float</em>) – The timeout for receiving.</li>
546
+</ul>
547
+</td>
548
+</tr>
549
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The received data storage object or None, if no data was received.</p>
550
+</td>
551
+</tr>
552
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#socket_protocol.data_storage" title="socket_protocol.data_storage">data_storage</a></p>
553
+</td>
554
+</tr>
555
+</tbody>
556
+</table>
557
+</dd></dl>
558
+
559
+<dl class="method">
560
+<dt id="socket_protocol.pure_json_protocol.reconnect">
561
+<code class="descname">reconnect</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.reconnect" title="Permalink to this definition">¶</a></dt>
562
+<dd><p>This methods initiates a reconnect by calling <code class="xref py py-func docutils literal notranslate"><span class="pre">comm_instance.reconnect()</span></code>.</p>
563
+</dd></dl>
564
+
565
+<dl class="method">
566
+<dt id="socket_protocol.pure_json_protocol.register_callback">
567
+<code class="descname">register_callback</code><span class="sig-paren">(</span><em>service_id</em>, <em>data_id</em>, <em>callback</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.register_callback" title="Permalink to this definition">¶</a></dt>
568
+<dd><table class="docutils field-list" frame="void" rules="none">
569
+<col class="field-name" />
570
+<col class="field-body" />
571
+<tbody valign="top">
572
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
573
+<li><strong>service_id</strong> (<em>int</em>) – The Service-ID for the message. See class definitions starting with <code class="docutils literal notranslate"><span class="pre">SID_</span></code>.</li>
574
+<li><strong>data_id</strong> (<em>int</em>) – The Data-ID for the message.</li>
575
+</ul>
576
+</td>
577
+</tr>
578
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True, if registration was successfull; False, if registration failed (e.g. existance of a callback for this configuration)</p>
579
+</td>
580
+</tr>
581
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
582
+</td>
583
+</tr>
584
+</tbody>
585
+</table>
586
+<p>This method registers a callback for the given parameters. Givin <code class="docutils literal notranslate"><span class="pre">None</span></code> means, that all Service-IDs or all Data-IDs are used.
587
+If a message hitting these parameters has been received, the callback will be executed.</p>
588
+<div class="admonition note">
589
+<p class="first admonition-title">Note</p>
590
+<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">callback()</span></code> is priorised in the following order:</p>
591
+<ul class="last simple">
592
+<li>Callbacks with defined Service-ID and Data-ID.</li>
593
+<li>Callbacks with a defined Data-ID.</li>
594
+<li>Callbacks with a defined Service-ID.</li>
595
+<li>Unspecific Callbacks</li>
596
+</ul>
597
+</div>
598
+<div class="admonition note">
599
+<p class="first admonition-title">Note</p>
600
+<p>The <code class="xref py py-func docutils literal notranslate"><span class="pre">callback()</span></code> is executed with these arguments:</p>
601
+<table class="docutils field-list" frame="void" rules="none">
602
+<col class="field-name" />
603
+<col class="field-body" />
604
+<tbody valign="top">
605
+<tr class="field-odd field"><th class="field-name">param msg:</th><td class="field-body">A <a class="reference internal" href="#socket_protocol.data_storage" title="socket_protocol.data_storage"><code class="xref py py-class docutils literal notranslate"><span class="pre">data_storage</span></code></a> object containing all message information.</td>
606
+</tr>
607
+<tr class="field-even field"><th class="field-name">returns:</th><td class="field-body">(<code class="xref py py-const docutils literal notranslate"><span class="pre">status</span></code>, <code class="xref py py-const docutils literal notranslate"><span class="pre">response_data</span></code>)</td>
608
+</tr>
609
+</tbody>
610
+</table>
611
+<ul class="last simple">
612
+<li><code class="xref py py-const docutils literal notranslate"><span class="pre">status</span></code>: A status as defined as a constant of this class <code class="xref py py-const docutils literal notranslate"><span class="pre">STA_*</span></code> to be used as status for the response.</li>
613
+<li><code class="xref py py-const docutils literal notranslate"><span class="pre">response_data</span></code>: A JSON iterable object to be used as data for the response.</li>
614
+</ul>
615
+</div>
616
+<div class="admonition note">
617
+<p class="first admonition-title">Note</p>
618
+<p class="last">Only callbacks defined in <a class="reference internal" href="#socket_protocol.pure_json_protocol.SID__RESPONSE_DICT" title="socket_protocol.pure_json_protocol.SID__RESPONSE_DICT"><code class="xref py py-const docutils literal notranslate"><span class="pre">pure_json_protocol.SID__RESPONSE_DICT</span></code></a> will send a response, using a Service-ID given in the dict and the same Data-ID to the client.</p>
619
+</div>
620
+</dd></dl>
621
+
622
+<dl class="method">
623
+<dt id="socket_protocol.pure_json_protocol.send">
624
+<code class="descname">send</code><span class="sig-paren">(</span><em>service_id</em>, <em>data_id</em>, <em>data</em>, <em>status=0</em>, <em>timeout=2</em>, <em>log_lvl=20</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.pure_json_protocol.send" title="Permalink to this definition">¶</a></dt>
625
+<dd><table class="docutils field-list" frame="void" rules="none">
626
+<col class="field-name" />
627
+<col class="field-body" />
628
+<tbody valign="top">
629
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
630
+<li><strong>service_id</strong> (<em>int</em>) – The Service-ID for the message. See class definitions starting with <code class="docutils literal notranslate"><span class="pre">SERVICE_</span></code>.</li>
631
+<li><strong>data_id</strong> (<em>int</em>) – The Data-ID for the message.</li>
632
+<li><strong>data</strong> (<em>str</em>) – The data to be transfered. The data needs to be json compatible.</li>
633
+<li><strong>status</strong> (<em>int</em>) – The Status for the message. All requests should have <code class="docutils literal notranslate"><span class="pre">STATUS_OKAY</span></code>.</li>
634
+<li><strong>timeout</strong> (<em>float</em>) – The timeout for sending data (e.g. time to establish new connection).</li>
635
+<li><strong>rx_log_lvl</strong> (<em>int</em>) – The log level to log outgoing TX-data</li>
636
+</ul>
637
+</td>
638
+</tr>
639
+<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">True if data had been sent, otherwise False.</p>
640
+</td>
641
+</tr>
642
+<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">bool</p>
643
+</td>
644
+</tr>
645
+</tbody>
646
+</table>
647
+<p>This methods sends out a message with the given content.</p>
648
+</dd></dl>
649
+
650
+</dd></dl>
651
+
652
+<dl class="class">
653
+<dt id="socket_protocol.struct_json_protocol">
654
+<em class="property">class </em><code class="descclassname">socket_protocol.</code><code class="descname">struct_json_protocol</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#socket_protocol.struct_json_protocol" title="Permalink to this definition">¶</a></dt>
655
+<dd><p>This Class has the same functionality like <a class="reference internal" href="#socket_protocol.pure_json_protocol" title="socket_protocol.pure_json_protocol"><code class="xref py py-class docutils literal notranslate"><span class="pre">pure_json_protocol</span></code></a>. The message length is less than for <a class="reference internal" href="#socket_protocol.pure_json_protocol" title="socket_protocol.pure_json_protocol"><code class="xref py py-class docutils literal notranslate"><span class="pre">pure_json_protocol</span></code></a>, but the functionality and compatibility is reduced.</p>
656
+<div class="admonition note">
657
+<p class="first admonition-title">Note</p>
658
+<p class="last">This class is depreceated and here for compatibility reasons (to support old clients or servers). Usage of <a class="reference internal" href="#socket_protocol.pure_json_protocol" title="socket_protocol.pure_json_protocol"><code class="xref py py-class docutils literal notranslate"><span class="pre">pure_json_protocol</span></code></a> is recommended.</p>
659
+</div>
660
+</dd></dl>
661
+
662
+</div>
663
+<div class="toctree-wrapper compound">
664
+</div>
665
+</div>
666
+<div class="section" id="indices-and-tables">
667
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
668
+<ul class="simple">
669
+<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
670
+<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
671
+<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
672
+</ul>
673
+</div>
674
+
675
+
676
+           </div>
677
+           
678
+          </div>
679
+          <footer>
680
+  
681
+
682
+  <hr/>
683
+
684
+  <div role="contentinfo">
685
+    <p>
686
+        
687
+        &copy; Copyright 2021, Dirk Alders
688
+
689
+    </p>
690
+  </div>
691
+    
692
+    
693
+    
694
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
695
+    
696
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
697
+    
698
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
699
+
700
+</footer>
701
+
702
+        </div>
703
+      </div>
704
+
705
+    </section>
706
+
707
+  </div>
708
+  
709
+
710
+  <script type="text/javascript">
711
+      jQuery(function () {
712
+          SphinxRtdTheme.Navigation.enable(true);
713
+      });
714
+  </script>
715
+
716
+  
717
+  
718
+    
719
+   
720
+
721
+</body>
722
+</html>

BIN
_docs_/objects.inv View File


+ 216
- 0
_docs_/py-modindex.html View File

@@ -0,0 +1,216 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Python Module Index &mdash; socket_protocol  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+  <!--[if lt IE 9]>
24
+    <script src="_static/js/html5shiv.min.js"></script>
25
+  <![endif]-->
26
+  
27
+    
28
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
29
+        <script type="text/javascript" src="_static/jquery.js"></script>
30
+        <script type="text/javascript" src="_static/underscore.js"></script>
31
+        <script type="text/javascript" src="_static/doctools.js"></script>
32
+        <script type="text/javascript" src="_static/language_data.js"></script>
33
+    
34
+    <script type="text/javascript" src="_static/js/theme.js"></script>
35
+
36
+    
37
+    <link rel="index" title="Index" href="genindex.html" />
38
+    <link rel="search" title="Search" href="search.html" />
39
+ 
40
+
41
+    <script type="text/javascript">
42
+      DOCUMENTATION_OPTIONS.COLLAPSE_INDEX = true;
43
+    </script>
44
+
45
+
46
+</head>
47
+
48
+<body class="wy-body-for-nav">
49
+
50
+   
51
+  <div class="wy-grid-for-nav">
52
+    
53
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
54
+      <div class="wy-side-scroll">
55
+        <div class="wy-side-nav-search" >
56
+          
57
+
58
+          
59
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> socket_protocol
60
+          
61
+
62
+          
63
+          </a>
64
+
65
+          
66
+            
67
+            
68
+          
69
+
70
+          
71
+<div role="search">
72
+  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
73
+    <input type="text" name="q" placeholder="Search docs" />
74
+    <input type="hidden" name="check_keywords" value="yes" />
75
+    <input type="hidden" name="area" value="default" />
76
+  </form>
77
+</div>
78
+
79
+          
80
+        </div>
81
+
82
+        
83
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
84
+          
85
+            
86
+            
87
+              
88
+            
89
+            
90
+              <!-- Local TOC -->
91
+              <div class="local-toc"></div>
92
+            
93
+          
94
+        </div>
95
+        
96
+      </div>
97
+    </nav>
98
+
99
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
100
+
101
+      
102
+      <nav class="wy-nav-top" aria-label="top navigation">
103
+        
104
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
105
+          <a href="index.html">socket_protocol</a>
106
+        
107
+      </nav>
108
+
109
+
110
+      <div class="wy-nav-content">
111
+        
112
+        <div class="rst-content">
113
+        
114
+          
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+<div role="navigation" aria-label="breadcrumbs navigation">
131
+
132
+  <ul class="wy-breadcrumbs">
133
+    
134
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
135
+        
136
+      <li>Python Module Index</li>
137
+    
138
+    
139
+      <li class="wy-breadcrumbs-aside">
140
+        
141
+      </li>
142
+    
143
+  </ul>
144
+
145
+  
146
+  <hr/>
147
+</div>
148
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
149
+           <div itemprop="articleBody">
150
+            
151
+
152
+   <h1>Python Module Index</h1>
153
+
154
+   <div class="modindex-jumpbox">
155
+   <a href="#cap-s"><strong>s</strong></a>
156
+   </div>
157
+
158
+   <table class="indextable modindextable">
159
+     <tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
160
+     <tr class="cap" id="cap-s"><td></td><td>
161
+       <strong>s</strong></td><td></td></tr>
162
+     <tr>
163
+       <td></td>
164
+       <td>
165
+       <a href="index.html#module-socket_protocol"><code class="xref">socket_protocol</code></a></td><td>
166
+       <em></em></td></tr>
167
+   </table>
168
+
169
+
170
+           </div>
171
+           
172
+          </div>
173
+          <footer>
174
+  
175
+
176
+  <hr/>
177
+
178
+  <div role="contentinfo">
179
+    <p>
180
+        
181
+        &copy; Copyright 2021, Dirk Alders
182
+
183
+    </p>
184
+  </div>
185
+    
186
+    
187
+    
188
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
189
+    
190
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
191
+    
192
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
193
+
194
+</footer>
195
+
196
+        </div>
197
+      </div>
198
+
199
+    </section>
200
+
201
+  </div>
202
+  
203
+
204
+  <script type="text/javascript">
205
+      jQuery(function () {
206
+          SphinxRtdTheme.Navigation.enable(true);
207
+      });
208
+  </script>
209
+
210
+  
211
+  
212
+    
213
+   
214
+
215
+</body>
216
+</html>

+ 214
- 0
_docs_/search.html View File

@@ -0,0 +1,214 @@
1
+
2
+
3
+<!DOCTYPE html>
4
+<html class="writer-html4" lang="en" >
5
+<head>
6
+  <meta charset="utf-8">
7
+  
8
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
9
+  
10
+  <title>Search &mdash; socket_protocol  documentation</title>
11
+  
12
+
13
+  
14
+  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
15
+  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
16
+
17
+  
18
+  
19
+  
20
+  
21
+
22
+  
23
+    
24
+  <!--[if lt IE 9]>
25
+    <script src="_static/js/html5shiv.min.js"></script>
26
+  <![endif]-->
27
+  
28
+    
29
+      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
30
+        <script type="text/javascript" src="_static/jquery.js"></script>
31
+        <script type="text/javascript" src="_static/underscore.js"></script>
32
+        <script type="text/javascript" src="_static/doctools.js"></script>
33
+        <script type="text/javascript" src="_static/language_data.js"></script>
34
+    
35
+    <script type="text/javascript" src="_static/js/theme.js"></script>
36
+
37
+    
38
+    <script type="text/javascript" src="_static/searchtools.js"></script>
39
+    <link rel="index" title="Index" href="genindex.html" />
40
+    <link rel="search" title="Search" href="#" /> 
41
+</head>
42
+
43
+<body class="wy-body-for-nav">
44
+
45
+   
46
+  <div class="wy-grid-for-nav">
47
+    
48
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
49
+      <div class="wy-side-scroll">
50
+        <div class="wy-side-nav-search" >
51
+          
52
+
53
+          
54
+            <a href="index.html" class="icon icon-home" alt="Documentation Home"> socket_protocol
55
+          
56
+
57
+          
58
+          </a>
59
+
60
+          
61
+            
62
+            
63
+          
64
+
65
+          
66
+<div role="search">
67
+  <form id="rtd-search-form" class="wy-form" action="#" method="get">
68
+    <input type="text" name="q" placeholder="Search docs" />
69
+    <input type="hidden" name="check_keywords" value="yes" />
70
+    <input type="hidden" name="area" value="default" />
71
+  </form>
72
+</div>
73
+
74
+          
75
+        </div>
76
+
77
+        
78
+        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
79
+          
80
+            
81
+            
82
+              
83
+            
84
+            
85
+              <!-- Local TOC -->
86
+              <div class="local-toc"></div>
87
+            
88
+          
89
+        </div>
90
+        
91
+      </div>
92
+    </nav>
93
+
94
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
95
+
96
+      
97
+      <nav class="wy-nav-top" aria-label="top navigation">
98
+        
99
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
100
+          <a href="index.html">socket_protocol</a>
101
+        
102
+      </nav>
103
+
104
+
105
+      <div class="wy-nav-content">
106
+        
107
+        <div class="rst-content">
108
+        
109
+          
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+<div role="navigation" aria-label="breadcrumbs navigation">
126
+
127
+  <ul class="wy-breadcrumbs">
128
+    
129
+      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
130
+        
131
+      <li>Search</li>
132
+    
133
+    
134
+      <li class="wy-breadcrumbs-aside">
135
+        
136
+            
137
+        
138
+      </li>
139
+    
140
+  </ul>
141
+
142
+  
143
+  <hr/>
144
+</div>
145
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
146
+           <div itemprop="articleBody">
147
+            
148
+  <noscript>
149
+  <div id="fallback" class="admonition warning">
150
+    <p class="last">
151
+      Please activate JavaScript to enable the search functionality.
152
+    </p>
153
+  </div>
154
+  </noscript>
155
+
156
+  
157
+  <div id="search-results">
158
+  
159
+  </div>
160
+
161
+           </div>
162
+           
163
+          </div>
164
+          <footer>
165
+  
166
+
167
+  <hr/>
168
+
169
+  <div role="contentinfo">
170
+    <p>
171
+        
172
+        &copy; Copyright 2021, Dirk Alders
173
+
174
+    </p>
175
+  </div>
176
+    
177
+    
178
+    
179
+    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
180
+    
181
+    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
182
+    
183
+    provided by <a href="https://readthedocs.org">Read the Docs</a>. 
184
+
185
+</footer>
186
+
187
+        </div>
188
+      </div>
189
+
190
+    </section>
191
+
192
+  </div>
193
+  
194
+
195
+  <script type="text/javascript">
196
+      jQuery(function () {
197
+          SphinxRtdTheme.Navigation.enable(true);
198
+      });
199
+  </script>
200
+
201
+  
202
+  
203
+    
204
+  
205
+  <script type="text/javascript">
206
+    jQuery(function() { Search.loadIndex("searchindex.js"); });
207
+  </script>
208
+  
209
+  <script type="text/javascript" id="searchindexloader"></script>
210
+   
211
+
212
+
213
+</body>
214
+</html>

+ 1
- 0
_docs_/searchindex.js View File

@@ -0,0 +1 @@
1
+Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:55},filenames:["index.rst"],objects:{"":{socket_protocol:[0,0,0,"-"]},"socket_protocol.data_storage":{get_data:[0,2,1,""],get_data_id:[0,2,1,""],get_service_id:[0,2,1,""],get_status:[0,2,1,""]},"socket_protocol.pure_json_protocol":{AUTH_STATE_KEY_TRANSFERRED:[0,3,1,""],AUTH_STATE_SEED_REQUESTED:[0,3,1,""],AUTH_STATE_SEED_TRANSFERRED:[0,3,1,""],AUTH_STATE_TRUSTED_CLIENT:[0,3,1,""],AUTH_STATE_UNKNOWN_CLIENT:[0,3,1,""],AUTH_STATE__NAMES:[0,3,1,""],SID_AUTH_KEY_CHECK_REQUEST:[0,3,1,""],SID_AUTH_KEY_CHECK_RESPONSE:[0,3,1,""],SID_AUTH_KEY_REQUEST:[0,3,1,""],SID_AUTH_SEED_REQUEST:[0,3,1,""],SID_CHANNEL_NAME_REQUEST:[0,3,1,""],SID_CHANNEL_NAME_RESPONSE:[0,3,1,""],SID_EXECUTE_REQUEST:[0,3,1,""],SID_EXECUTE_RESPONSE:[0,3,1,""],SID_READ_REQUEST:[0,3,1,""],SID_READ_RESPONSE:[0,3,1,""],SID_WRITE_REQUEST:[0,3,1,""],SID_WRITE_RESPONSE:[0,3,1,""],SID__NO_AUTH_LIST:[0,3,1,""],SID__RESPONSE_DICT:[0,3,1,""],STATUS_AUTH_REQUIRED:[0,3,1,""],STATUS_BUFFERING_UNHANDLED_REQUEST:[0,3,1,""],STATUS_CHECKSUM_ERROR:[0,3,1,""],STATUS_OKAY:[0,3,1,""],STATUS_OPERATION_NOT_PERMITTED:[0,3,1,""],STATUS_SERVICE_OR_DATA_UNKNOWN:[0,3,1,""],STATUS__NAMES:[0,3,1,""],authentificate:[0,2,1,""],check_authentification_state:[0,2,1,""],connection_established:[0,2,1,""],is_connected:[0,2,1,""],receive:[0,2,1,""],reconnect:[0,2,1,""],register_callback:[0,2,1,""],send:[0,2,1,""]},socket_protocol:{data_storage:[0,1,1,""],pure_json_protocol:[0,1,1,""],struct_json_protocol:[0,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute"},terms:{"class":0,"default":0,"float":0,"function":0,"int":0,"new":0,"return":0,"true":0,IDs:0,The:0,after:0,alder:0,all:0,also:0,ani:0,arg:0,argument:0,auth_state__nam:0,auth_state_key_transf:0,auth_state_seed_request:0,auth_state_seed_transf:0,auth_state_trusted_cli:0,auth_state_unknown_cli:0,authentif:0,authentification_feedback:0,authetif:0,author:0,auto_auth:0,automat:0,avail:0,been:0,binascii:0,bool:0,both:0,buffer:0,call:0,callback:0,channel:0,channel_nam:0,check:0,check_authentification_st:0,checksum:0,client:0,comm_inst:0,commun:0,compat:0,configur:0,connect:0,connection_establish:0,constant:0,contain:0,content:0,creat:0,data:0,data_id:0,data_storag:0,defin:0,definit:0,deprec:0,descript:0,design:0,dict:0,dictionari:0,differ:0,directli:0,dirk:0,disconnect:0,enabl:0,error:0,establish:0,exchang:0,execut:0,exist:0,fail:0,fals:0,follow:0,get:0,get_data:0,get_data_id:0,get_service_id:0,get_statu:0,given:0,givin:0,had:0,has:0,have:0,here:0,hexlifi:0,hit:0,identifi:0,incl:0,index:0,inform:0,init_channel_nam:0,initi:0,initialis:0,instanc:0,interfac:0,is_client:0,is_connect:0,issu:0,iter:0,json:0,kei:0,kwarg:0,least:0,length:0,less:0,level:0,like:0,list:0,log:0,log_lvl:0,manual:0,mean:0,messag:0,method:0,mockeri:0,modul:0,mount:0,msg:0,name:0,need:0,none:0,object:0,okai:0,old:0,onli:0,oper:0,optin:0,option:0,order:0,otherwis:0,out:0,outgo:0,over:0,page:0,param:0,paramet:0,permit:0,point:0,previou:0,prioris:0,process:0,pure_json_protocol:0,read:0,read_request:0,read_respons:0,reason:0,receiv:0,recommend:0,reconnect:0,reduc:0,regist:0,register_callback:0,register_connect_callback:0,register_disconnect_callback:0,registr:0,relev:0,request:0,requir:0,respons:0,response_data:0,rx_log_lvl:0,same:0,search:0,secret:0,see:0,seed:0,send:0,sent:0,server:0,servic:0,service_:0,service_id:0,set:0,should:0,sid:0,sid_:0,sid__no_auth_list:0,sid__response_dict:0,sid_auth_key_check_request:0,sid_auth_key_check_respons:0,sid_auth_key_request:0,sid_auth_seed_request:0,sid_channel_name_request:0,sid_channel_name_respons:0,sid_execute_request:0,sid_execute_respons:0,sid_read_request:0,sid_read_respons:0,sid_write_request:0,sid_write_respons:0,side:0,sta_:0,start:0,state:0,statu:0,status__nam:0,status_auth_requir:0,status_buffering_unhandled_request:0,status_checksum_error:0,status_okai:0,status_operation_not_permit:0,status_service_or_data_unknown:0,storag:0,str:0,struct_json_protocol:0,submodul:0,successful:0,sudo:0,support:0,taken:0,than:0,thei:0,thi:0,time:0,timeout:0,transfer:0,trust:0,type:0,unhandl:0,unittest:0,unknown:0,unspecif:0,urandom:0,usag:0,use:0,used:0,using:0,valu:0,via:0,warn:0,which:0,without:0,write:0,write_request:0,write_respons:0,you:0},titles:["Welcome to socket_protocol\u2019s documentation!"],titleterms:{document:0,indic:0,protocol:0,socket:0,socket_protocol:0,tabl:0,welcom:0}})

Loading…
Cancel
Save