Basic structure of Client class
Fixed infinite loop in server