Socket-based server wrapper