Handles connection between server and peers within a protocol