freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] net.c and related
- Date: Tue, 09 Dec 2003 21:04:42 -0000
Some time ago I proposed to add a net.c file to separate low-level
network handling. This to isolate relate low-level stuff from
read.c/write.c in a single file and to support in easier way named-pipe.
Named-pipe are still a TODO however there are many reason to isolate
this code:
- avoid strange macro such WRITESOCKET/READSOCKET, just some functions.
- use some platform-dependent optimizations (MSG_NOSIGNAL, MSG_DONTWAIT,
TCP_CORK and whatever)
I noted a difference in write.c and read.c. In write.c we disable
SIGPIPE while in read.c not... This problem can be the cause of strange
Roland Bole problem?? It seem a bug to me... I fixed the problem for
Linux but I think should be fixed for all platforms...
Another issue related to sockets is no-blocking. We always call a select
and then send/write/recv/read however IMHO is better to use no-blocking
sockets and call select only to wait data, just to reduce syscalls...
freddy77
-
[freetds] net.c and related,
Frediano Ziglio, 12/09/2003
- <Possible follow-up(s)>
-
RE: [freetds] net.c and related,
Lowden, James K, 12/09/2003
- RE: [freetds] net.c and related, Frediano Ziglio, 12/09/2003
Archive powered by MHonArc 2.6.24.