📄 sipcresponse.cs
字号:
namespace Imps.Base.Sipc
{
using System;
public class SipcResponse : SipcMessage
{
private string _reasonPhrase;
private int _statusCode;
public SipcResponse()
{
this._reasonPhrase = string.Empty;
}
public SipcResponse(int statusCode, string reasonPhrease)
{
this._reasonPhrase = string.Empty;
this.StatusCode = statusCode;
this.ReasonPhrase = reasonPhrease;
}
public SipcResponse(int statusCode, string reasonPhrease, SipcRequest req)
{
this._reasonPhrase = string.Empty;
this.StatusCode = statusCode;
this.ReasonPhrase = reasonPhrease;
base.Headers.Add(req.CallId);
base.Headers.Add(req.CSeq);
}
protected override string GetFirstLine()
{
return string.Format("SIP-C/2.0 {0} {1}", this._statusCode, this._reasonPhrase);
}
public string Method
{
get
{
SipcCSeqHeader cSeq = base.CSeq;
if (cSeq != null)
{
return cSeq.Method;
}
return string.Empty;
}
}
public string ReasonPhrase
{
get
{
return this._reasonPhrase;
}
set
{
this._reasonPhrase = (value == null) ? string.Empty : value.Trim();
}
}
public int StatusCode
{
get
{
return this._statusCode;
}
set
{
this._statusCode = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -