Out of scope? socket wrappers

"Wesley W. Terpstra" <[email protected]> Sat, 26 Oct 2002 22:19:49 +0200
Newsgroups gmane.comp.lib.state-threads.user
Message-ID <[email protected]>
--qcHopEYAB45HaUaB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

libst is great partly because it works nearly everywhere we have a bsd
socket layer. This means users have portable and performance code when they
use libst.

However, many programs which use libst could benefit if libst would pull
just a little bit more of the socket grunt-work inside itself.

Specifically, I mean:
	res.c gets pulled into libst
	a 'st_new_socket()' function added
	a 'st_bind_tcp_port(fd, port)' function added
	a 'st_bind_udp_port(fd, port)' function added

With those four functions added, a client of the libst library could
theorectically make use of ONLY libst calls with regards to networking.

This does not detract from the use of libst on specific things like pipes,
unix domain sockets, etc, however it allows a program to make use of a
subset of libst's potential and then acheive network portability by
offloading the work.

I am not sure about this idea myself...

While I think the four changes I propose above are harmless in themselves,=
=20
I worry that users might then demand that libst do more for them and thus
lead to bloat.

However, for most applications, I think those four methods would be enough.
If people wanted more functionality, we could tell them: "so target your OS"

As always, I volunteer to do the work.

--=20
Wesley W. Terpstra <[email protected]>

--qcHopEYAB45HaUaB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9uvjlvLvElXGKklYRAhqaAJ9Sg0GAecYr7Siz68xQpLL9ZTciMwCfRLgS
6DnsylsAI4TGS9Q6Zo+nSGU=
=K3Mg
-----END PGP SIGNATURE-----

--qcHopEYAB45HaUaB--


-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com