byte[] buffer = new byte[BufferSize];
int bytesRead; // 读取的字节数
MemoryStream msStream = new MemoryStream();
do {
bytesRead = streamToClient.Read(buffer, , BufferSize);
msStream.Write(buffer, , bytesRead);
} while (bytesRead > ); buffer = msStream.GetBuffer();