projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2007-06-21 Dick Porter <dick@ximian.com>
[mono.git]
/
mcs
/
class
/
System
/
System.Net
/
RequestStream.cs
diff --git
a/mcs/class/System/System.Net/RequestStream.cs
b/mcs/class/System/System.Net/RequestStream.cs
index 12d1afad4a061bba8995636a478ea887555a26c0..a1ebb40795ed39d862cef27523b8ab5fd8e110c5 100644
(file)
--- a/
mcs/class/System/System.Net/RequestStream.cs
+++ b/
mcs/class/System/System.Net/RequestStream.cs
@@
-30,26
+30,23
@@
using System.IO;
using System.Net.Sockets;
using System.Runtime.InteropServices;
namespace System.Net {
using System.Net.Sockets;
using System.Runtime.InteropServices;
namespace System.Net {
- class RequestStream :
Network
Stream
+ class RequestStream : Stream
{
byte [] buffer;
int offset;
int length;
long remaining_body;
bool disposed;
{
byte [] buffer;
int offset;
int length;
long remaining_body;
bool disposed;
+ Stream stream;
- internal RequestStream (S
ocket sock, byte [] buffer, int offset, int length) :
-
base (sock, false
)
+ internal RequestStream (S
tream stream, byte [] buffer, int offset, int length)
+
: this (stream, buffer, offset, length, -1
)
{
{
- this.buffer = buffer;
- this.offset = offset;
- this.length = length;
- this.remaining_body = -1;
}
}
- internal RequestStream (Socket sock, byte [] buffer, int offset, int length, long contentlength) :
- base (sock, false)
+ internal RequestStream (Stream stream, byte [] buffer, int offset, int length, long contentlength)
{
{
+ this.stream = stream;
this.buffer = buffer;
this.offset = offset;
this.length = length;
this.buffer = buffer;
this.offset = offset;
this.length = length;
@@
-142,7
+139,7
@@
namespace System.Net {
return nread;
}
return nread;
}
- nread =
base
.Read (buffer, offset, count);
+ nread =
stream
.Read (buffer, offset, count);
if (nread > 0 && remaining_body > 0)
remaining_body -= nread;
return nread;
if (nread > 0 && remaining_body > 0)
remaining_body -= nread;
return nread;
@@
-171,7
+168,7
@@
namespace System.Net {
// for HTTP pipelining
if (remaining_body >= 0 && count > remaining_body)
count = (int) Math.Min (Int32.MaxValue, remaining_body);
// for HTTP pipelining
if (remaining_body >= 0 && count > remaining_body)
count = (int) Math.Min (Int32.MaxValue, remaining_body);
- return
base
.BeginRead (buffer, offset, count, cback, state);
+ return
stream
.BeginRead (buffer, offset, count, cback, state);
}
public override int EndRead (IAsyncResult ares)
}
public override int EndRead (IAsyncResult ares)
@@
-190,7
+187,7
@@
namespace System.Net {
}
// Close on exception?
}
// Close on exception?
- int nread =
base
.EndRead (ares);
+ int nread =
stream
.EndRead (ares);
if (remaining_body > 0 && nread > 0)
remaining_body -= nread;
return nread;
if (remaining_body > 0 && nread > 0)
remaining_body -= nread;
return nread;