receive data through socket