X xoenice Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-15 #1 我的服务器采用ServerSocket.SendBuf(Buf,len1)发送,而客户端采用len2:=ClientSocket.ReceiveBuf(Buf,65536)为什么在发送和接收中len1与len2不相等?
我的服务器采用ServerSocket.SendBuf(Buf,len1)发送,而客户端采用len2:=ClientSocket.ReceiveBuf(Buf,65536)为什么在发送和接收中len1与len2不相等?
Y YANGWEI0308 Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-15 #2 ServerSocket.SendBuf(Buf,len1)改为ServerSocket.SendBuf(Buf[1],len1) len2:=ClientSocket.ReceiveBuf(Buf,65536)改为 var Len:integer; begin Len:=ClientSocket.ReceiveLength; len2:=ClientSocket.ReceiveBuf(Buf[1],Len); end;
ServerSocket.SendBuf(Buf,len1)改为ServerSocket.SendBuf(Buf[1],len1) len2:=ClientSocket.ReceiveBuf(Buf,65536)改为 var Len:integer; begin Len:=ClientSocket.ReceiveLength; len2:=ClientSocket.ReceiveBuf(Buf[1],Len); end;
X xoenice Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-15 #5 每次64个字节,但是收到的通常比64大很多,有1K多
Y YANGWEI0308 Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-15 #7 好的,yangwei0308@263.net