diff options
Diffstat (limited to 'net/udp/udp_socket_libevent.cc')
-rw-r--r-- | net/udp/udp_socket_libevent.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/udp/udp_socket_libevent.cc b/net/udp/udp_socket_libevent.cc index 3782db3..beb1dca 100644 --- a/net/udp/udp_socket_libevent.cc +++ b/net/udp/udp_socket_libevent.cc @@ -292,6 +292,16 @@ void UDPSocketLibevent::AllowBroadcast() { socket_options_ |= SOCKET_OPTION_BROADCAST; } +void UDPSocketLibevent::ReadWatcher::OnFileCanReadWithoutBlocking(int) { + if (!socket_->read_callback_.is_null()) + socket_->DidCompleteRead(); +} + +void UDPSocketLibevent::WriteWatcher::OnFileCanWriteWithoutBlocking(int) { + if (!socket_->write_callback_.is_null()) + socket_->DidCompleteWrite(); +} + void UDPSocketLibevent::DoReadCallback(int rv) { DCHECK_NE(rv, ERR_IO_PENDING); DCHECK(!read_callback_.is_null()); |