container_network/servlet/network-servlet.go
crusader f28ff9a303 ing
2018-04-20 00:46:38 +09:00

56 lines
1.1 KiB
Go

package servlet
import (
"net"
"git.loafle.net/commons/server-go"
css "git.loafle.net/commons/server-go/socket"
ocs "git.loafle.net/overflow/container-go/servlet"
)
type NetworkServlet interface {
ocs.RPCServlet
}
type NetworkServlets struct {
ocs.RPCServlets
}
func (s *NetworkServlets) Init(serverCtx server.ServerCtx) error {
if err := s.RPCServlets.Init(serverCtx); nil != err {
return err
}
return nil
}
func (s *NetworkServlets) OnStart(serverCtx server.ServerCtx) error {
if err := s.RPCServlets.OnStart(serverCtx); nil != err {
return err
}
return nil
}
func (s *NetworkServlets) OnStop(serverCtx server.ServerCtx) {
s.RPCServlets.OnStop(serverCtx)
}
func (s *NetworkServlets) Destroy(serverCtx server.ServerCtx) {
s.RPCServlets.Destroy(serverCtx)
}
func (s *NetworkServlets) Handshake(servletCtx server.ServletCtx, conn net.Conn) error {
return nil
}
func (s *NetworkServlets) OnConnect(servletCtx server.ServletCtx, conn css.Conn) {
s.RPCServlets.OnConnect(servletCtx, conn)
}
func (s *NetworkServlets) OnDisconnect(servletCtx server.ServletCtx) {
s.RPCServlets.OnDisconnect(servletCtx)
}