fixed client.m to purge its buffer after it sends a message