initial communications protocol parsing logic