transport - Re: [transport] API comments
Subject: Transport protocols and bulk file transfer
List archive
- From: stanislav shalunov <>
- To:
- Subject: Re: [transport] API comments
- Date: 24 Feb 2005 23:43:34 -0500
Yunhong Gu
<>
writes:
> int x_sockerror(X_SOCKET skt)
>
> I think the parameter "skt" is not very useful because the error is
> always checked right after a socket function is called. For example,
> on *nix "errno" is used
But in C, ``int ferror(FILE *stream)'', ``int feof(FILE *stream)'' is
a per-object error checking. The advantage is that is the programmer
is not sufficiently meticulous about error checking, errors could
still, sometimes, be caught---with subsequent error checks.
Having a per-socket error state looks like a tradeoff to me: the
socket structure is larger, but this somewhat compensates for the lack
of a native exception mechanism in C (not fully, of course). Given
that a typical socket might have quite a bit of buffer space
associated with it, I'd expect that the extra space to keep an error
code to be negligible.
What should x_sockerror() return, though? Shall we need a list of
error codes at some later point, or can we get by with errno.h? (This
is mostly independent of whether the function takes an argument.)
--
Stanislav Shalunov http://www.internet2.edu/~shalunov/
Letters in this message are closer than they appear.
- [transport] Proposed agenda for 2005-02-18 transport teleconference, stanislav shalunov, 02/17/2005
- Re: [transport] Proposed agenda for 2005-02-18 transport teleconference, Brian Tierney, 02/18/2005
- [transport] user-space overhead, stanislav shalunov, 02/21/2005
- [transport] Minutes for 2005-02-18 transport teleconference, stanislav shalunov, 02/21/2005
- API comments, Yunhong Gu, 02/24/2005
- Re: [transport] API comments, Steven Senger, 02/24/2005
- Re: [transport] API comments, stanislav shalunov, 02/24/2005
- Re: [transport] API comments, Yunhong Gu, 02/25/2005
- Re: [transport] API comments, stanislav shalunov, 02/25/2005
- Re: [transport] API comments, Yunhong Gu, 02/25/2005
- Re: [transport] API comments, stanislav shalunov, 02/25/2005
- Re: [transport] API comments, Yunhong Gu, 02/25/2005
- Re: [transport] API comments, stanislav shalunov, 02/25/2005
- Re: [transport] API comments, Yunhong Gu, 02/25/2005
- API comments, Yunhong Gu, 02/24/2005
- Re: [transport] Proposed agenda for 2005-02-18 transport teleconference, Brian Tierney, 02/18/2005
Archive powered by MHonArc 2.6.16.