Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want emit message to specific room by websocket. but not working example document. #991

Closed
whiteprimrose opened this issue May 2, 2018 · 4 comments
Labels
good first issue A user wrote a good first issue with clear instructions 🤘 status:resolved 🐞 type:bug

Comments

@whiteprimrose
Copy link

Examples for the Iris project can be found at
https://github.com/kataras/iris/tree/master/_examples.

Documentation for the Iris project can be found at
https://godoc.org/github.com/kataras/iris.

Love iris? Please consider supporting the project:
👉 https://iris-go.com/donate

Care to be part of a larger community? Fill our user experience form:
👉 https://goo.gl/forms/lnRbVgA6ICTkPyk02

Hello. I want emit to specific room. but not working document example.

This is the same symptom of the link : https://stackoverflow.com/questions/46271256/websocket-message-to-specific-room-golang-kataras-iris

@kataras
Copy link
Owner

kataras commented May 2, 2018

Did you tried to move the c.OnMessage before the c.To...Emit ?

@whiteprimrose
Copy link
Author

Attach the code. Please point out if you have a strange code.

server code : https://play.golang.org/p/xM8C7doEAS3
template code : https://jsfiddle.net/9b9uxowq/

@kataras
Copy link
Owner

kataras commented May 2, 2018

Nice example @whiteprimrose, fixed now :) upgrade with go get -u github.com/kataras/iris and you should be fine.

@kataras kataras added the good first issue A user wrote a good first issue with clear instructions label May 2, 2018
@kataras
Copy link
Owner

kataras commented May 2, 2018

The problem was caused by a third-party contributor a long time ago, I fixed it for good, I'm truly sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A user wrote a good first issue with clear instructions 🤘 status:resolved 🐞 type:bug
Projects
None yet
Development

No branches or pull requests

2 participants