aboutsummaryrefslogtreecommitdiff
path: root/SocketHttpListener/Net/HttpConnection.cs
diff options
context:
space:
mode:
authorhawken <hawken@thehawken.org>2019-01-24 18:56:43 +0100
committerBond-009 <bond.009@outlook.com>2019-01-24 18:56:43 +0100
commit3701ce40375fc13987174f843b61b2d757d4a11f (patch)
treee00bf09e648844ad4b8d6c8c5823995ae8a64775 /SocketHttpListener/Net/HttpConnection.cs
parentb2ffad9ce946544d87e285fd200c089b47bfb323 (diff)
Eliminate some compile warnings (#600)
* Remove some unused variables * remove duplicate "using .." by sorting and deduping the list * Remove things that already exist in the parent class (in one case I moved some documentation to the parent) * EntityBodyData and and NextSearch were never set (only read), removed * _timeout was never read, subsequently _timer became unused. part of a TODO timeout functionality that was not implemented yet
Diffstat (limited to 'SocketHttpListener/Net/HttpConnection.cs')
-rw-r--r--SocketHttpListener/Net/HttpConnection.cs9
1 files changed, 0 insertions, 9 deletions
diff --git a/SocketHttpListener/Net/HttpConnection.cs b/SocketHttpListener/Net/HttpConnection.cs
index f11cb0725..e89f4ed9b 100644
--- a/SocketHttpListener/Net/HttpConnection.cs
+++ b/SocketHttpListener/Net/HttpConnection.cs
@@ -32,8 +32,6 @@ namespace SocketHttpListener.Net
int _reuses;
bool _contextBound;
bool secure;
- int _timeout = 90000; // 90k ms for first request, 15k ms from then on
- private Timer _timer;
IPEndPoint local_ep;
HttpListener _lastListener;
X509Certificate cert;
@@ -91,8 +89,6 @@ namespace SocketHttpListener.Net
public async Task Init()
{
- _timer = new Timer(OnTimeout, null, Timeout.Infinite, Timeout.Infinite);
-
if (ssl_stream != null)
{
var enableAsync = true;
@@ -162,14 +158,10 @@ namespace SocketHttpListener.Net
_buffer = new byte[BufferSize];
try
{
- if (_reuses == 1)
- _timeout = 15000;
- //_timer.Change(_timeout, Timeout.Infinite);
_stream.BeginRead(_buffer, 0, BufferSize, s_onreadCallback, this);
}
catch
{
- //_timer.Change(Timeout.Infinite, Timeout.Infinite);
CloseSocket();
Unbind();
}
@@ -216,7 +208,6 @@ namespace SocketHttpListener.Net
private void OnReadInternal(IAsyncResult ares)
{
- //_timer.Change(Timeout.Infinite, Timeout.Infinite);
int nread = -1;
try
{