programing in rcm5600w

Hi I am new to the module.

I have 2 Rabbit 5600w module and have been trying to setup wifi communication between the 2 module.I already pinged each other. But i want to send data each other.
(when I press switch in one module, the motor connected on other must rotate)
Does anyone have any sample code for module 1 to send data to module 2 & vice versa?

Any information would be great!