write to console through tcp