【发布时间】:2011-09-22 20:40:46
【问题描述】:
问题
我有PHP 客户端,它将图像文件发送到C# 套接字服务器。我的问题是30%文件被部分传输并停止。
PHP 结束 ->
$file = file_get_contents('a.bmp');
socket_write($socket,$file);
C# 结束 ->
int l= Socket.Receive(buffer, buffer.Length, SocketFlags.None);
//create the file using a file stream
我怎样才能在没有中间状态的情况下始终传输完整文件?为什么会这样?
【问题讨论】:
-
您尝试发送的文件有多大?