Added socket to message parsing