TCP protocol implementation for Basil