2008-02-16から1日間の記事一覧

Pound 2.4

http://www.apsis.ch/pound/ とりあえずメモ。 ざっと見た感じIPv6への対応とURLによるセッションが主な変更点かな?

echod.c

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <errno.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define die(s) do { perror((s)); exit(1); } while(0) #ifdef DEBUG #…</errno.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>

echod_prefork.c

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <errno.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define die(s) do { perror((s)); exit(1); } while(0) #ifdef DEBUG #…</errno.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>

echod_multithread.c

TIME_WAITがたまっていくけど、いいのかなぁ・・・ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <pthread.h> #include <errno.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define die(s) do…</errno.h></pthread.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>

echod_select.c

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <sys/select.h> #include <sys/time.h> #include <errno.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define die(s) do { f…</errno.h></sys/time.h></sys/select.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>

echod_poll.c

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <poll.h> #include <errno.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define MAX_NFDS 1024 #define POLL_TIMEOUT 1000 #…</errno.h></poll.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>

Google: Keyboard shortcuts

WEB

http://www.google.com/search?hl=ja&esrch=BetaShortcuts&q=hoge こんな試験やってたんだー。

echod_epoll.c

レベルトリガとして使用。まあ、高速なpoll(2)ですね。 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <sys/epoll.h> #include <errno.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define MAX_EV…</errno.h></sys/epoll.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>

libevent: Patches for Cygwin

http://monkeymail.org/archives/libevent-users/2007-June/000685.html

echod_libevent.c

意外と苦戦。ドキュメントないなー。 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <event.h> #define ECHO_PORT 7 #define MAX_BACKLOG 5 #define RCVBUFSIZE 256 #define MAX…</event.h></errno.h></fcntl.h></unistd.h></sys/types.h></arpa/inet.h></sys/socket.h></string.h></stdlib.h></stdio.h>