Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StopError = errors.New("listener stopped")
Functions ¶
This section is empty.
Types ¶
type HttpEntry ¶
type HttpEntry struct { Host string Port int MaxSize int Server *http.Server StopListener *StopListener MessageQueue queue.MessageQueue }
func NewHttpEntry ¶
func (*HttpEntry) ListenAndServe ¶
type StopListener ¶
type StopListener struct { *net.TCPListener // 包装的 TCP 监听器 // contains filtered or unexported fields }
StopListener 包装了 net.TCPListener,用于在需要时停止监听
func NewStopListener ¶
func NewStopListener(l net.Listener) (*StopListener, error)
func (*StopListener) Stop ¶
func (sl *StopListener) Stop()
Click to show internal directories.
Click to hide internal directories.