Did you not try to debug your code before posting here?

Eg. does sendMessage transmit a valid message?
Which lines of receiveMessage are actually executed?