separate socketio logic from network adapter