Documentation
¶
Index ¶
- func Serve(eventHandler EventHandler, addr string, opts ...Option) error
- type Connection
- type EventHandler
- type Option
- type Options
- type Poller
- func (ep *Poller) AddRead(fd int) error
- func (ep *Poller) AddWrite(fd int) error
- func (ep *Poller) Delete(fd int) error
- func (ep *Poller) ModRead(fd int) error
- func (ep *Poller) ModReadWrite(fd int) error
- func (ep *Poller) Poll(handler func(fd int, event int32))
- func (ep *Poller) Trigger(job internal.Job) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type EventHandler ¶
type EventHandler interface { OnNewConnect(c Connection) OnNewRead(c Connection, readBuffer *ringbuffer.RingBuffer) OnClose(c Connection) }
type Option ¶
type Option func(opts *Options)
func WithAcceptCoroutineNum ¶
func WithEventCoroutineNum ¶
func WithReusePort ¶
func WithRingBufSize ¶
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
func (*Poller) ModReadWrite ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.