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

HandleSentMessageBinary func set error #32

Closed
yangjinecho opened this issue May 18, 2017 · 1 comment
Closed

HandleSentMessageBinary func set error #32

yangjinecho opened this issue May 18, 2017 · 1 comment
Assignees
Labels

Comments

@yangjinecho
Copy link

func (m *Melody) HandleSentMessageBinary(fn func(*Session, []byte)) {
m.messageSentHandler = fn
}
should be
func (m *Melody) HandleSentMessageBinary(fn func(*Session, []byte)) {
m.messageSentHandlerBinary = fn
}

@olahol olahol added the bug label May 18, 2017
@olahol olahol self-assigned this May 18, 2017
@olahol olahol closed this as completed in d521390 May 18, 2017
@olahol
Copy link
Owner

olahol commented May 18, 2017

Fixed this, thank you @yangjinecho.

fink-al added a commit to fink-al/melody that referenced this issue Mar 20, 2024
* add make and lint (fink-al)
* fix go mod path (fink-al)
* expose get websocket connection (fink-al)
* Fix test data race (Ola)
* Concurrent message handling (Ola)
* Bump Go CI version (Ola)
* Bump github.com/gin-gonic/gin from 1.8.1 to 1.9.1 in /examples (dependabot[bot])
* refactor: unnecessary guard check (piglig)
* Tests for UnSet (Ola)
* added session.UnSet() function (idc77)
* Close session on write error (Ola)
* Merge pull request olahol#76 from olahol/dependabot/go_modules/examples/golang.org/x/net-0.7.0 (Ola)
* Bump golang.org/x/net in /examples (dependabot[bot])
* Merge pull request olahol#75 from olahol/dependabot/go_modules/examples/golang.org/x/crypto-0.1.0 (Ola)
* Bump golang.org/x/crypto in /examples (dependabot[bot])
* Merge pull request olahol#74 from olahol/dependabot/go_modules/examples/golang.org/x/text-0.3.8 (Ola)
* Bump golang.org/x/text from 0.3.7 to 0.3.8 in /examples (dependabot[bot])
* Update doc.go (Ola)
* Update multichat example (Ola)
* Update filewatch example (Ola)
* Update README (Ola)
* Rewrite gophers example (Ola)
* Update README (Ola)
* Add standard library example (Ola)
* Contributors image. (Ola)
* Update gophers example. (Ola)
* Report card. (Ola)
* Add code coverage badge. (Ola)
* Add github actions. (Ola)
* Make session Get and Set concurrency safe (Ola)
* Rewrite tests and increase test coverage (Ola)
* Update README to be clearer about Websocket heartbeats. (Ola)
* Update gophers example. (Ola)
* Update changelog. (Ola)
* add local addr and remote addr function to session (parkerzhu)
* add local addr and remote addr for session (parkerzhu)
* Use constant error for Sessions (Ola)
* retrieve all sessions (gabstv)
* Constant errors (Ola)
* Create Go module (Ola)
* Fix concurrent panic (lesismal)
* Merge pull request olahol#36 from yoki123/patch-1 (Ola Holmström)
* Support for the subprotocol (Yoki)
* Fix HandleSentMessageBinary, close olahol#32. (Ola Holmström)
* Merge branch 'patch-2' of https://github.com/robbiet480/melody (Ola Holmström)
* Remove default close handler which caused abnormal closes (Robbie Trencheny)
* Add IsClosed method to Melody (Robbie Trencheny)
* Update README and examples to use gopkg.in import. (Ola Holmström)
* Update changelog with `BroadcastMultiple` and allowing any origin by default. (Ola Holmström)
* Merge branch 'patch-1' of https://github.com/robbiet480/melody (Ola Holmström)
* Merge branch 'allow-all-origins-by-default' of https://github.com/robbiet480/melody (Ola Holmström)
* Update .travis.yml (Robbie Trencheny)
* Allow any Origin by default. Closes olahol#23 (Robbie Trencheny)
* Instead of using BroadcastFilter just loop over the slice of sessions and broadcast to each one (Robbie Trencheny)
* Add convenience function to broadcast to multiple sessions (Robbie Trencheny)
* Update changelog. (Ola Holmström)
* Merge branch 'session-isclosed' of https://github.com/robbiet480/melody into robbiet480-session-isclosed (Ola Holmström)
* Update changelog. (Ola Holmström)
* Fix typo error message. (Ola Holmström)
* Add IsClosed method to Session (Robbie Trencheny)
* Golint fixes (Robbie Trencheny)
* Add closeHandler support (Robbie Trencheny)
* Allow sending custom close messages (Robbie Trencheny)
* fix messageSentHandlerBinary initilization (Ola Holmström)
* split HandleSentMessage into text and binary methods (Ola Holmström)
* Add `HandleRequestWithKeys` so that `session.Keys` can be populated. Close olahol#18. (Ola Holmström)
* Return error messages for some exposed methods, fix panic when connection is closed. Close olahol#21. (Ola Holmström)
* Add a handler for message successfully sent (Robbie Trencheny)
* Add 1.7 to travis and reduce number of connections in `TestLen`. (Ola Holmström)
* Add `Len()` to fetch number of connected sessions. Close olahol#16. (Ola Holmström)
* remove coverage (Ola Holmström)
* fix travis (Ola Holmström)
* Store data on a per sessions basis, based on the Gin interface. (Ola Holmström)
* Merge branch 'master' of https://github.com/ReforgedStudios/melody into ReforgedStudios-master (Ola Holmström)
* Merge pull request olahol#2 from huljas/generic_params (Heikki Uljas)
* Use generic params (Heikki Uljas)
* Changed session params to be generic type (Heikki Uljas)
* add echo example (Ola Holmström)
* gophers example (Ola Holmström)
* golint (Ola Holmström)
* remove go 1.6 from testin (Ola Holmström)
* add HandlePong (Ola Holmström)
* Use a mutex to ensure SetPongHandler atomicity (Matt Caldwell)
* Add hook for extending PongHandler (Matt Caldwell)
* Merge pull request olahol#1 from huljas/fix_concurrency (Heikki Uljas)
* Always call the connect handler before any message handler. (Heikki Uljas)
* Added params to session (Heikki Uljas)
* use write raw instead of write message in ping, close olahol#8 (Ola Holmström)
* add @shiwano and update changelog (Ola Holmström)
* Add broadcast methods for a binary message (Shogo Iwano)
* rewrite writeMessage (Ola Holmström)
* ensure order of messages and dispatch error handler when buffer is full (Ola Holmström)
* Issue olahol#3: Add close method (Ola Holmström)
* Merge pull request olahol#2 from saulshanabrook/patch-1 (Ola Holmström)
* Add troubleshooting for 403 (Saul Shanabrook)
* fix doc.go (Ola Holmström)
* license (Ola Holmström)
* better docs (Ola Holmström)
* fix readme (Ola Holmström)
* add coveralls status to readme (Ola Holmström)
* test another goveralls config (Ola Holmström)
* reenable coveralls (Ola Holmström)
* do not use quickcheck for broadcast (Ola Holmström)
* test on 1.3 (Ola Holmström)
* add async writes to broadcast (Ola Holmström)
* comment out broadcast test (Ola Holmström)
* remove check in TestBroadcast (Ola Holmström)
* try only version 1.4 (Ola Holmström)
* revert to using travis only (Ola Holmström)
* fix coveralls (Ola Holmström)
* binary messages and tests (Ola Holmström)
* expose Upgrader issue olahol#1 (Ola Holmström)
* multi channel chat demo (Ola Holmström)
* update readme (Ola Holmström)
* link to api (Ola Holmström)
* fix demo use gif instead of webm (Ola Holmström)
* demo (Ola Holmström)
* fix documentation (Ola Holmström)
* documentation (Ola Holmström)
* badges (Ola Holmström)
* fix travis (Ola Holmström)
* travis (Ola Holmström)
* first version (Ola Holmström)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants