You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
synctv/internal/op/message.go

28 lines
381 B
Go

package op
import (
"io"
"github.com/gorilla/websocket"
)
type Message interface {
MessageType() int
String() string
Encode(w io.Writer) error
}
type PingMessage struct{}
func (pm *PingMessage) MessageType() int {
return websocket.PingMessage
}
func (pm *PingMessage) String() string {
return "Ping"
}
func (pm *PingMessage) Encode(w io.Writer) error {
return nil
}