1008 - Too many binary messages.
in some case we are getting 1008 error code on websocket.
in the documentation (http://docs.microsofttranslator.com/speech-translate.html), there are some error codes, like 1001, 1011, but not 1008.
it seems for us that Azure closes the websocket connection, with this error code, in certain cases. the question is why this happens?
Translator closes the websocket connection after a period of inactivity. You will want to silently recreate the websocket connection when you receive this error.
That is generally a good thing, because you won’t be charged for the time the connection is not open.
The docs could be better in documenting the techniques for keeping the connection alive and the associated messaging. I’ll see to making that happen.
Gergo Bota commented
this 1008 is not about inactivity i think,. " too many binary messages" would mean inactivity? quite confusing.
we tried the inactivity, as far as i remember it was 10min silence. after 10min inactivity, or rather "silence", connection is closed by microsoft side, that part is clear.
this was almost after connection establishment, so it cannot be related to inactivity i think.
however we have not met this error recently, so for now we are fine, i will just check the updated documentation .