libt2n-git Archives

Subject: C++ inter-process communication library branch, switch-to-epoll, updated. v0.7-15-g2ed8f23

From: libt2n-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libt2n-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 10 Apr 2024 09:50:04 +0200 (CEST)
The branch, switch-to-epoll has been updated
       via  2ed8f23cf369f51418efe15805d96ac802cdf54f (commit)
      from  e0b3ff8345171e7a40a0a686d5d0670dead9145d (commit)


- Log -----------------------------------------------------------------
commit 2ed8f23cf369f51418efe15805d96ac802cdf54f
Author: Gabriel Braga <gabriel.braga@xxxxxxxxxxxxx>
Date:   Wed Apr 10 09:47:07 2024 +0200

    Deleting comments that do not add value
    
    This just deletes some unnecessary comments.

-----------------------------------------------------------------------

Summary of changes:
 src/socket_handler.cpp |    5 ++---
 src/socket_server.cpp  |    4 ++--
 test/reentrant.cpp     |    1 -
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/socket_handler.cpp b/src/socket_handler.cpp
index 355f623..5423b93 100644
--- a/src/socket_handler.cpp
+++ b/src/socket_handler.cpp
@@ -339,7 +339,6 @@ void socket_handler::create_epoll()
     if (epoll_fd == -1)
         EXCEPTIONSTREAM(error,t2n_server_error, "error opening epoll: " << 
strerror(errno));
 
-    //adding sock (fd) to the set of events that epoll API will monitor
     if(sock != -1)
         add_to_epoll(sock,&sock);
     else
@@ -356,7 +355,7 @@ void socket_handler::add_to_epoll(int fd,void* ptr)
     struct epoll_event ev;
     ev.events = EPOLLIN;
     ev.data.ptr = ptr;
-    //adding newsock (client fd) to the set of events that epoll API will 
monitor
+
     if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd,&ev) == -1)
         EXCEPTIONSTREAM(error,t2n_server_error,"error adding server socket to 
epoll(): " << strerror(errno));
 
@@ -371,7 +370,7 @@ void socket_handler::add_to_epoll(int fd,void* ptr)
 void socket_handler::remove_from_epoll(int fd)
 {
     struct epoll_event ev;
-    //removing (client fd) from the set of events that epoll API monitors
+
     if (epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd,&ev) == -1)
         LOGSTREAM(debug,"error deleting server socket to epoll(): " << 
strerror(errno) << "  ...ignoring"<<endl);
 }
diff --git a/src/socket_server.cpp b/src/socket_server.cpp
index b8c4099..e80ee34 100644
--- a/src/socket_server.cpp
+++ b/src/socket_server.cpp
@@ -131,7 +131,7 @@ socket_server::socket_server(const std::string& path, 
mode_t filemode, const std
             EXCEPTIONSTREAM(error,t2n_server_error,"error changing socket 
ownership: " << strerror(errno));
     }
 
-    socket_handler::create_epoll();
+    create_epoll();
 
     start_listening();
 
@@ -214,7 +214,7 @@ bool socket_server::fill_buffer(int timeout)
     {
         if (errno == EINTR)
         {
-            // select interrupted by signal
+            // epoll interrupted by signal
             nfds=0;
         }
         else
diff --git a/test/reentrant.cpp b/test/reentrant.cpp
index ff1c81a..1d6547d 100644
--- a/test/reentrant.cpp
+++ b/test/reentrant.cpp
@@ -169,7 +169,6 @@ BOOST_AUTO_TEST_CASE(ReentrantServer)
                 for (int i=0; i < requests_per_child; i++)
                 {
                     socket_client_connection sc("./socket");
-                    // sc.set_logging(&cerr,debug);
                     command_client cc(&sc);
 
                     result_container rc;


hooks/post-receive
-- 
C++ inter-process communication library

--
libt2n-git - see http://www.intra2net.com/en/developer/libt2n for details.
To unsubscribe send a mail to libt2n-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • C++ inter-process communication library branch, switch-to-epoll, updated. v0.7-15-g2ed8f23, libt2n-git <=