如何通过套接字发送长消息?以及如何接收?
服务器:
long size;
f = fopen("file.txt","r");;
fseek(f,0,SEEK_END);
size = ftell(f);
rewind(f);
printf("Size: %ld Bytes\n",size);
/* send "size" with send method */
send(socket,???,???,0);
客户:
long size;
recv(socket,???,???,0);
感谢大家的帮助。