diff options
-rw-r--r-- | src/lib/ecore_con/efl_net_socket_fd.c | 15 | ||||
-rw-r--r-- | src/lib/ecore_con/efl_net_socket_fd.eo | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/ecore_con/efl_net_socket_fd.c b/src/lib/ecore_con/efl_net_socket_fd.c index 822154cbb3..e2ddcc222b 100644 --- a/src/lib/ecore_con/efl_net_socket_fd.c +++ b/src/lib/ecore_con/efl_net_socket_fd.c @@ -238,6 +238,21 @@ _efl_net_socket_fd_efl_io_reader_can_read_set(Eo *o, Efl_Net_Socket_Fd_Data *pd } } +EOLIAN static void +_efl_net_socket_fd_efl_io_reader_eos_set(Eo *o, Efl_Net_Socket_Fd_Data *pd EINA_UNUSED, Eina_Bool value) +{ + Eina_Bool old = efl_io_reader_eos_get(o); + if (old == value) return; + + efl_io_reader_eos_set(efl_super(o, MY_CLASS), value); + + if (!value) return; + + /* stop monitoring the FD, it's closed */ + efl_event_callback_del(o, EFL_LOOP_FD_EVENT_READ, _efl_net_socket_fd_event_read, NULL); + efl_event_callback_del(o, EFL_LOOP_FD_EVENT_WRITE, _efl_net_socket_fd_event_write, NULL); +} + EOLIAN static Eina_Error _efl_net_socket_fd_efl_io_writer_write(Eo *o, Efl_Net_Socket_Fd_Data *pd EINA_UNUSED, Eina_Slice *ro_slice, Eina_Slice *remaining) { diff --git a/src/lib/ecore_con/efl_net_socket_fd.eo b/src/lib/ecore_con/efl_net_socket_fd.eo index b5973f9578..8250800eec 100644 --- a/src/lib/ecore_con/efl_net_socket_fd.eo +++ b/src/lib/ecore_con/efl_net_socket_fd.eo @@ -38,6 +38,7 @@ class Efl.Net.Socket.Fd (Efl.Loop.Fd, Efl.Io.Reader.Fd, Efl.Io.Writer.Fd, Efl.Io Efl.Io.Closer.closed.get; Efl.Io.Reader.read; Efl.Io.Reader.can_read.set; + Efl.Io.Reader.eos.set; Efl.Io.Writer.write; Efl.Io.Writer.can_write.set; Efl.Net.Socket.address_local; |