[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Second shim



On Mon, 31 Oct 2005, Erik Nordmark wrote:

Thinking about a second shim to handle connection establishment, I've come up with code (not running yet ;-) to do a

	int connect_by_name(char *hostname, int port);

that can be implemented entirely as a library (using non-blocking connect() calls). It returns a socket file descriptor.

Nice.

For by connect_by_name() and the connect() hackery, this only applies to TCP; can't make it apply to UDP since UDP doesn't have a notion of "I succeeded using this IP address".

You could go the whole hog and provide "second shim" read/write/send{,to,msg} style calls too, and shim failures on the fly. Might also be a good way to protype any shim control protocol.

regards,
--
Paul Jakma	paul@clubi.ie	paul@jakma.org	Key ID: 64A2FF6A
Fortune:
Before you ask more questions, think about whether you really want to
know the answers.
		-- Gene Wolfe, "The Claw of the Conciliator"