Skip to content

Commit

Permalink
add write buff drained callback
Browse files Browse the repository at this point in the history
  • Loading branch information
shaovie committed Sep 22, 2023
1 parent 8cf505e commit a4060b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions io_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ func (h *IOHandle) Destroy(eh EvHandler) {
}
}

// OnWriteBufferDrained called by asyncWriteBufQ drained
func (h *IOHandle) OnWriteBufferDrained() {
}

//
//= EvHandler interface

Expand Down
1 change: 1 addition & 0 deletions io_handle_async.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (h *IOHandle) AsyncOrderedFlush(eh EvHandler) {
if h.asyncWriteBufQ.IsEmpty() {
h.ep.remove(fd, EvOut)
h.asyncWriteWaiting = false
h.OnWriteBufferDrained()
}
}

Expand Down

0 comments on commit a4060b7

Please sign in to comment.