Peter N Lewis wrote:
It's a triffle tedious to convert the C stuff over, but since I do it ad hoc as needed, it's not to bad at any one time. It's a bit error prone and obviously not going to handle changing the interfaces or porting to another unix system, but my code is all heaviy Mac specific anyway so no big deal there.
Of course, you can do in your own code as you please. However, I'd prefer if on this list portable techniques were advocated where available.
Here, a little C wrapper can easily use the system header definitions, and since it's only needed for setting up/closing a connection etc., while the actual socket I/O can go through regular files, the (anyway small) performance overhead should be negligible.
Frank