Code cleanup for network module.
This commit is contained in:
@@ -4,7 +4,7 @@ using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Cryville.Common.Network.Http11 {
|
||||
public class Http11Response {
|
||||
public class Http11Response : IDisposable {
|
||||
static readonly char[] spchar = new char[]{ ' ' };
|
||||
public string HttpVersion { get; private set; }
|
||||
public string StatusCode { get; private set; }
|
||||
@@ -28,6 +28,16 @@ namespace Cryville.Common.Network.Http11 {
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing) {
|
||||
if (disposing) {
|
||||
MessageBody.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return string.Format("<{0} {1} {2}>", HttpVersion, StatusCode, ReasonPhase);
|
||||
}
|
||||
|
Reference in New Issue
Block a user