Closed steveoc64 closed 8 years ago
Please verify and if you like the project consider to star it.
Tested, all works 100% Thanks a million, great work.
:+1: V2 is looking good
Excellent!
Another followup .... more good news
I have another port of this application that uses echo v1, which really hammers the use of websockets. This app uses modified Go RPC calls over a socket connection between the front end (web browser) and the backend.
The frontend is also written in Go, and compiles to JS using GopherJS. Bit complicated, but I figured if anything is going to break, then this app will. This app is functionally equivalent to the other app, but its written in pure Go, and uses sockets rather than HTTP requests.
Long story short ... after a few minor changes to the code, both front and back compile with v2, all loads up and runs, no probs, and passes internal test. V2 is working well.
It actually appears to run a little bit faster than the v1 code ? Not sure, but its certainly super quick, with sub-millisecond response times for complex page builds. Comms throughput is generally 4-8x faster than the same app that uses HTTP. Happy with that.
Can mark #447 as closed whenever you want.
Can you do... e.Get("/ws", fasthttp.WrapHandler(websocket.Handler(webSocket)))
? (fasthttp).
cant try it now from this machine ... will try that tomorrow and report back
Porting my app from echo v1 to v2. Everything proceeding well, but I am stuck on getting websockets working under v2.
Should be pretty straightforward, as everything works sweet under v1, I figure that I am missing something obvious in porting to v2.
Environment :
Getting this runtime error as soon as the client makes the initial websocket request, with v2 :
... which continues down the page, in each case the Hijack call appears to call itself, ad infinitum, as the stack pointers match the frame pointers for each successive row in the stack trace.
Code in engine/standard/response.go : 90 =
.... looks like something is getting messed up to the point where the call to Hijack() on the responseWriter ends up calling itself ? Not sure.
Relevant parts of my code at the back end looks like this :