Added sendAll and recvAll. But need to bugfix. Corrected for gcc c89.