Am Donnerstag, 7. Juli 2016 16:25:38 UTC+3 schrieb Bogdan Bursuc: > > The websocket protocol is a TCP socket in the end after you establish the > handshake, this means you will send raw data through it and you can make > the protocol and errors as you want. > There will be no status code anymore, because what you send through that > connection wont be http anymore. > > Thank you for your replies. Both helped me to better understand the concepts of websockets.
On Thu, Jul 7, 2016 at 3:59 PM Viktor Kojouharov <[email protected] > <javascript:>> wrote: > >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- > Thanks, > Bogdan I. Bursuc > -- 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.
