Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { Addr string TLS *tls.Config ConnNotify ConnNotify ConnMgr *cmgr.ConnectionManager ConnNumMax int AutoRoute bool HandshakeTimeout time.Duration Handler mux.Handler Consumer io.Writer }
server options
type ProtocolServer ¶
protocol server
type QuicServer ¶
type QuicServer struct {
// contains filtered or unexported fields
}
func NewQuicServer ¶
func NewQuicServer(opts Options, exOpts interface{}) *QuicServer
func (*QuicServer) Close ¶
func (srv *QuicServer) Close() error
func (*QuicServer) ListenAndServeTLS ¶
func (srv *QuicServer) ListenAndServeTLS() error
type Server ¶
type Server struct { // protocol type used Type string // the server address Addr string // the tls config TLSConfig *tls.Config // ConnNotify will be called when a new connection coming ConnNotify ConnNotify // the local connection store ConnMgr *cmgr.ConnectionManager //auto route AutoRoute bool // handshake timeout HandshakeTimeout time.Duration // mux handler Handler mux.Handler // consumer for raw data Consumer io.Writer // extend options ExOpts interface{} // contains filtered or unexported fields }
func (*Server) ListenAndServeTLS ¶
listen and serve
type WSServer ¶
type WSServer struct {
// contains filtered or unexported fields
}
websocket protocol server
func NewWSServer ¶
func (*WSServer) ListenAndServeTLS ¶
Click to show internal directories.
Click to hide internal directories.