bi-directional connection with a client

adding code to communicate back with a client