diff seobeo/os/s_linux_edge.c @ 17:d97ec3ded2ae

[Seobeo] Few changes... - Fixed seobeo edge for macos - Updated so that socket creation can be used for both client and server - Started on a cutelient library for making connection to the server.
author June Park <parkjune1995@gmail.com>
date Sat, 04 Oct 2025 07:53:12 -0700
parents fb2cff495a60
children fa2b8af609d9
line wrap: on
line diff
--- a/seobeo/os/s_linux_edge.c	Fri Oct 03 09:55:51 2025 -0700
+++ b/seobeo/os/s_linux_edge.c	Sat Oct 04 07:53:12 2025 -0700
@@ -39,7 +39,7 @@
 {
   int epfd = epoll_create1(0);
   struct epoll_event ev = {
-    .events   = EPOLLIN,
+    .events   = EPOLLIN | EPOLLONESHOT,
     .data.ptr = p_server_handle
   };
   epoll_ctl(epfd, EPOLL_CTL_ADD,
@@ -50,9 +50,9 @@
   pthread_attr_setstacksize(&attr, 100 * 1024 * 1024); // 100 MB
 
   pthread_t  threads[thread_count];
-  WorkerArgs args = { p_server_handle, p_html_cache, epfd };
   for (int i = 0; i < thread_count; i++)
   {
+    WorkerArgs args = { p_server_handle, p_html_cache, epfd };
     pthread_create(&threads[i], NULL,
                    Seobeo_Web_Edge_Worker, &args);
   }