You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
874 B

6 years ago
6 years ago
6 years ago
  1. package app
  2. import (
  3. "github.com/ouxuanserver/osmanthuswine/src/core"
  4. "gopkg.in/olahol/melody.v1"
  5. )
  6. type Wstest struct {
  7. core.WebSocket
  8. }
  9. func (that *Wstest) HandleConnect(session *melody.Session) {
  10. //implement
  11. }
  12. func (that *Wstest) HandlePong(session *melody.Session) {
  13. //implement
  14. }
  15. func (that *Wstest) HandleMessage(session *melody.Session, data []byte) {
  16. that.GetMelody().Broadcast(data)
  17. //implement
  18. }
  19. func (that *Wstest) HandleMessageBinary(session *melody.Session, data []byte) {
  20. //implement
  21. }
  22. func (that *Wstest) HandleSentMessage(session *melody.Session, data []byte) {
  23. //implement
  24. }
  25. func (that *Wstest) HandleSentMessageBinary(session *melody.Session, data []byte) {
  26. //implement
  27. }
  28. func (that *Wstest) HandleDisconnect(session *melody.Session) {
  29. //implement
  30. }
  31. func (that *Wstest) HandleError(session *melody.Session, err error) {
  32. //implement
  33. }