overflow_gateway_websocket/internal/server/rpc/socket.go

29 lines
415 B
Go
Raw Normal View History

2017-11-13 16:50:22 +00:00
package rpc
import (
cwf "git.loafle.net/commons_go/websocket_fasthttp"
)
func newSocket(soc cwf.Socket, contentType string) Socket {
newSoc := &socket{
contentType: contentType,
}
newSoc.Socket = soc
return newSoc
}
type Socket interface {
cwf.Socket
GetContentType() string
}
type socket struct {
cwf.Socket
contentType string
}
func (s *socket) GetContentType() string {
return s.contentType
}