added access to the socket object (useful for getting peer IP/port) and defaulting to Unix line endings ('\n')