Patent attributes
A method and apparatus for encoding a SIP message into an internal binary format so that it can be treated much more efficiently by both the SIP stack layers and the application. Only one memory buffer is used to handle any sort of SIP message. For this reason, this new SIP message may be called a “mono-block” structure. It allows each SIP header's raw text from the original SIP message to be directly referred within the SIP mono-block with no additional copy. Only SIP headers that are “used” by the application, or by some SIP stack layer are parsed to form a “decoded” header object. The header parsing is made “on demand” at the moment header is accessed. Headers not used are not decoded and are left in text format with no additional processing needed.