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 }