Added IProtocolFactory, for default messages.
Added inline function in message streams for better perfomance.