fixed socket send/recv error, nixed sending of shared memory addresses, and added rval-checking of send()/recv()