BeginReceive方法没有重载3个参数代码如何修改

c#socket异步通信BeginReceive方法没有重载3个参数代码如何修改
public string SocketReceive()
{
string result = "";
try
{
MemoryStream stream = new MemoryStream();
Byte[] bytesReceived = new Byte[256];
int bytes = 0;
do
{
bytes = clientSocket.BeginReceive( bytesReceived,bytesReceived.Length, 0);
stream.Write(bytesReceived, 0, bytes);
}
while (bytes > 0);
result = System.Text.Encoding.UTF8.GetString(stream.ToArray());
//接收完毕后断开连接
clientSocket.Close();
}
catch (Exception e)
{
string strError = "";
DAL.Common.WriteErrorLog(e, strError);
}
return result;
}图片说明

关于异步通信的问题,你还是先了解一下BeginReceive吧。
http://www.cnblogs.com/shouhongxiao/p/3702016.html