Skip to content

Commit

Permalink
chore: refine BuiltinEventEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Oct 18, 2022
1 parent 691e077 commit 0b7fec8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,35 +278,35 @@ type (

// OnBoot fires when the engine is ready for accepting connections.
// The parameter engine has information and various utilities.
func (es *BuiltinEventEngine) OnBoot(_ Engine) (action Action) {
func (*BuiltinEventEngine) OnBoot(_ Engine) (action Action) {
return
}

// OnShutdown fires when the engine is being shut down, it is called right after
// all event-loops and connections are closed.
func (es *BuiltinEventEngine) OnShutdown(_ Engine) {
func (*BuiltinEventEngine) OnShutdown(_ Engine) {
}

// OnOpen fires when a new connection has been opened.
// The parameter out is the return value which is going to be sent back to the peer.
func (es *BuiltinEventEngine) OnOpen(_ Conn) (out []byte, action Action) {
func (*BuiltinEventEngine) OnOpen(_ Conn) (out []byte, action Action) {
return
}

// OnClose fires when a connection has been closed.
// The parameter err is the last known connection error.
func (es *BuiltinEventEngine) OnClose(_ Conn, _ error) (action Action) {
func (*BuiltinEventEngine) OnClose(_ Conn, _ error) (action Action) {
return
}

// OnTraffic fires when a local socket receives data from the peer.
func (es *BuiltinEventEngine) OnTraffic(_ Conn) (action Action) {
func (*BuiltinEventEngine) OnTraffic(_ Conn) (action Action) {
return
}

// OnTick fires immediately after the engine starts and will fire again
// following the duration specified by the delay return value.
func (es *BuiltinEventEngine) OnTick() (delay time.Duration, action Action) {
func (*BuiltinEventEngine) OnTick() (delay time.Duration, action Action) {
return
}

Expand Down

0 comments on commit 0b7fec8

Please sign in to comment.