SIPSorcery.Net.RTSPURL.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public new string ToString()
        {
            try
            {
                string urlStr = URLTransport + TRANSPORT_ADDR_SEPARATOR + Host;
                urlStr += (Path != null) ? Path : null;

                return urlStr;
            }
            catch(Exception excp)
            {
                logger.Error("Exception RTSPURL ToString. " + excp.Message);
                throw excp;
            }
        }

Usage Example

Ejemplo n.º 1
0
        public new string ToString()
        {
            try
            {
                string methodStr = (Method != RTSPMethodsEnum.UNKNOWN) ? Method.ToString() : UnknownMethod;

                string message = methodStr + " " + URL.ToString() + " " + RTSPVersion + m_CRLF;
                message += (Header != null) ? Header.ToString() : null;

                if (Body != null)
                {
                    message += m_CRLF + Body;
                }
                else
                {
                    message += m_CRLF;
                }

                return(message);
            }
            catch (Exception excp)
            {
                logger.LogError("Exception RTSPRequest ToString. " + excp.Message);
                throw;
            }
        }