sip/sipstack/SipVia.cxx
Data
SipVia::encode() const
{
    Data ret;
    
    ret = VIA;
    
    ret+= SP;

    
    //construct the sent-protocol
    Data sentprotocol = getprotoName();
    sentprotocol+= "/";
    sentprotocol+= DEFAULT_VERSION;
    sentprotocol+= "/";
    sentprotocol+= getTransport();
    sentprotocol+= SP; 
   
    ret += sentprotocol;
    ret +=getHost();
    Data pport = Data(getPort());
    if (pport.length() > 0)
    {
        ret+= ":";
        ret+= pport;
    }
    ret+= formOtherparms(); 
    ret+= CRLF;
      
    return ret;
}
/*** return the encoded string version of this. This call should only be
         used inside the stack and is not part of the API */
return the encoded string version of this. This call should only be
used inside the stack and is not part of the API
return the encoded string version of this . This call should only be used inside the stack and is not part of the API
Data
SipVia::encode() const
{
    Data ret;
    ret = VIA;
    ret+= SP;
    Data sentprotocol = getprotoName();
    sentprotocol+= "/";
    sentprotocol+= DEFAULT_VERSION;
    sentprotocol+= "/";
    sentprotocol+= getTransport();
    sentprotocol+= SP; 
    ret += sentprotocol;
    ret +=getHost();
    Data pport = Data(getPort());
    if (pport.length() > 0)
    {
        ret+= ":";
        ret+= pport;
    }
    ret+= formOtherparms(); 
    ret+= CRLF;
    return ret;
}
Data SipVia :: encode ( ) const { Data ret ; ret = VIA ; ret += SP ; Data sentprotocol = getprotoName ( ) ; sentprotocol += " " ; sentprotocol += DEFAULT_VERSION ; sentprotocol += " " ; sentprotocol += getTransport ( ) ; sentprotocol += SP ; ret += sentprotocol ; ret += getHost ( ) ; Data pport = Data ( getPort ( ) ) ; if ( pport . length ( ) > 0 ) { ret += " " ; ret += pport ; } ret += formOtherparms ( ) ; ret += CRLF ; return ret ; }
return the encoded string version of this.
return the encoded string version of this .
//construct the sent-protocol