●訂閱即可觀看更多我的視頻,並點擊該「贊」按鈕以支持該頻道!
各位程序員,您好!在本教程中,我們將研究如何使用Go中的Websockets開始構建一個非常簡單的實時聊天應用程序。
我們將在Websockets周圍使用流行的socket.io包裝器,以使自己輕鬆實現涉及圍繞該服務的前端。
如果您有任何問題,建議或意見,請在下面告訴我!
文字教學:https://tutorialedge.net/golang/golang-websockets-tutorial/
Visual Studio程式碼:https://code.visualstudio.com/
●我的Twitter►https://twitter.com/Elliot_f
●我的網站►https://tutorialedge.net。
This code no longer works, we must now use server.OnEvent method, so PM me if you want to work together on learning this. ( UPDATE: I found an example they have with the new API !!! https://github.com/googollee/go-socket.io/blob/master/example/main.go )
is dead outdated 🙁
All of your content is top-notch, both on your blog and here on YouTube. Thank you for sharing so much valuable knowledge with the world 🙂
Thanks for having a text version, it really helps.
Outdated! Doesn't work.
Why to use so huge dependency and bad reputation like Socket.IO instead of using vanilla WebSockets in client side? Just to handle downgrades and all possible edge cases which probably i don't need to handle? It feels like case where 99,9% tutorials advice to bring in jQuery bloatware to make simple DOM manipulation. And at the end, juniors should be educated one more time to work without jQuery.
Anyway, tnx for making Go content. Looking for vanilla implementations + Protocol Buffers (gRPC).
Great intro to golang websockets video!
Not sure if you used go-micro, but if you have, how would I implement that so I can have my websocket handle rpc calls?
thanks for tut
This should have more views/upvotes. Great explained, very clear voice. 🙂
Try to move away your asset server then connect on the websocket. This fucking library is shitty. You can't use CORS properly it just won't work.
Could you do another video to demonstrate how to use golang to simulate Socket.io protocol from the client side?
Love the accent. UK, right? Another guess is NZ
which extension r u using for highlighting braces and that line to show brace scope?