client connects and sends data