ここで msdn の例を使用しています: http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx
FileStream を MemoryStream に変更しましたが、バイトが読み取られません
FileStream に戻すと正常に動作します。
どんな手掛かり?
ありがとう
CompressMemoryStream();
Stream requestStream = _request.EndGetRequestStream(ar);
const int bufferLength = 2048;
byte[] buffer = new byte[bufferLength];
int count = 0;
int readBytes = 0;
do
{
//MemoryStream _compressedOutStream
//is created/filled by 'CompressMemoryStream()'
readBytes = _compressedOutStream.Read(buffer, 0, bufferLength);
requestStream.Write(buffer, 0, readBytes);
count += readBytes;
}
while (readBytes != 0);
requestStream.Close();
state.Request.BeginGetResponse(
new AsyncCallback(EndGetResponseCallback),
state
);