mtfelian / golang-socketio Goto Github PK
View Code? Open in Web Editor NEWThis project forked from graarh/golang-socketio
golang socket.io client and server
License: GNU General Public License v3.0
This project forked from graarh/golang-socketio
golang socket.io client and server
License: GNU General Public License v3.0
Hi.
I'm looking into socketio libraries to choose one, so I haven't used this yet.
Using gosocketio.Dial
to create a client immediately connects, before I've had a chance to install handlers. Is there a way to install handlers before the connection occurs, so we're certain my handlers can see every incoming message?
x509: certificate is valid for <localhost>, not <remote host>
Any ideas on what may be causing this?
I am connecting using the wss
protocol.
Connecting like so:
client, err := gosocketio.Dial("wss://"+host+"/test/socket.io", transport.DefaultWebsocketTransport())
I wont't be surprised if this is a Docker issue with my remote host... and not on golang-socket.io side...
Hi. I'm trying to use your lib with gin, so I've set up a server , and trying to connect with javascript client using latest socket.io-client package. It works only on transport "polling". When trying to upgrade to web sockets, it shows next:
My server code:
package main
import (
"github.com/gin-gonic/gin"
"github.com/mtfelian/golang-socketio"
)
func main() {
router := gin.Default()
sio := gosocketio.NewServer()
router.GET("/socket.io/", gin.WrapH(sio))
router.POST("/socket.io/", gin.WrapH(sio))
router.Run(":7000")
}
When I use latest socket.io server on NodeJS, it upgrades fine.
Just a heads-up with an issue that happened with me.
Lines 156 to 158 in 90487b6
isn't correct because sometimes you want to have a guarantee on the order of incoming messages.
Instead, you want to guarantee the order like so:
and let the consumer decides if he swaps a new goroutine for handling the message or handles it on the same one.
If you go to https://asciinema.org/a/192043 (between 1:57 and 2:15) and you see the execution of some shell commands you get why this is fundamental (every key you hit on the keyboard is an event).
Hi! I'm trying to connect to api.victra.io/stream
and got response with weird bytes attached to body 😢
base64
AAEACf8weyJzaWQiOiI3OTkzMjg2NmNlY2M0MTUyYThlYjEzZWQ4NmQ3NjAxZSIsInVwZ3JhZGVzIjpbIndlYnNvY2tldCJdLCJwaW5nVGltZW91dCI6NjAwMDAsInBpbmdJbnRlcnZhbCI6MjUwMDB9AAL/NDA=
raw
� ÿ0{"sid":"79932866cecc4152a8eb13ed86d7601e","upgrades":["websocket"],"pingTimeout":60000,"pingInterval":25000}�ÿ40
But JavaScript
or Python
clients works just fine
Could not figure out how to completly remove this from response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.