An class for performing multi-threaded web socket communication to a Wit endpoint
WitWebSocketClient is a wrapper for web socket communication that facilitates the safe upload and download of data between the
Voice SDK and Wit.ai. The class handles connection, transmission and response handling for all socket communication. Three background threads are spawned by each
WitWebSocketClient in order to handle encoding/uploading, downloading/decoding and response handling respectively. WitWebSocketClients contain a list of IWitWebSocketRequests which are used to facilitate upload and download of data. When sending a WitChunk the IWitWebSocketRequest’s request id will also be sent within the json data. When receiving a WitChunk, request id will be checked within the json data and the appropriate
IWitWebSocketRequest will handle the response. If no matching request is found, the WitChunk’s topic id will be used to find the appropriate IWitWebSocketSubscriber which then will generate a request to handle the response.