utility methods for easier graceful TCP ops