タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

epollに関するteppeyのブックマーク (1)

  • epoll を使った echo サーバ - odz buffer

    自分用メモ。epoll & Non-Blocking IO による echo サーバの例。 使い方のテスト以上のものではないので、そのままではいろいろまずい。epoll_create や socket で取得した file descriptor を close してなかったり。まねしないように。 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/socket.h> #include <sys/types.h> #include <sys/epoll.h> #include <netinet/in.h> #define SERVER_PORT 10007 #define MAX_EVENTS 10 #define BAC

    epoll を使った echo サーバ - odz buffer
  • 1