passing connection in client ondatareceived callback