The remote pu was a bit more tricky. Perhaps there are some subttle
differences between Mac and unix?! I'm no socket-wizard, so I just did
some trial-n-error :-)
For the slave to work:
First, I removed the SO_RCVTIME0 and SNDTIME0 options on the sockets.
According to my man page:
SO_RCVTIMEO and SO_SNDTIMEO
Specify the sending or receiving timeouts until
reporting an error. They are fixed to a protocol
specific setting in Linux and cannot be read or
written. Their functionality can be emulated using
alarm(2) or setitimer(2).
Apperently they have to be protected by some #if LINUX directive.
For the master I changed:
remoteAddress.sin_addr.s_addr =
htonl(ppu->info.remote.inAddress.s_addr);
to
remoteAddress.sin_addr.s_addr = ppu->info.remote.inAddress.s_addr;
THat is, removed the call to htonl. inAddress is already calculated
using inet_aton so it must be in network byte order already. So no need
to call htonl.
This seems to work.