You have to define your protocol that goes through the websocket. For 
example, the json-rpc protocol has a special error field when an error 
occurs.

On Thursday, July 7, 2016 at 10:45:04 AM UTC+3, Johann Höchtl wrote:
>
> I am using the gorilla websocket implementation. I am also new to 
> websockets.
>
> When I want to signal an error on an http-connection I used http.Error 
> which allwed me to set an http status error code, sets mime type to 
> text/plain an writes an error message to the receiver.
>
> How am I supposed to signal error conditions when using websockets. i 
> guess one I upgraded the http connection to a web socket connection 
> http.Error is no longer the way to go.
>
> My first quick searches didn't reveal examples of error handling 
> (usinggorilla websocket library.
>
> Thank you,Johann
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to