S
samen
Unregistered / Unconfirmed
GUEST, unregistred user!
Tsendrecord=record
ss:string[9];
...
end;
send:array[1..10000] of Tsendrecord;
rece:array[1..10000] of Tsendrecord;
sendst,recst:Tmemorystream;
发送端:
sendst:=Tmemorycreat;
sendst.write(send,sizeof(Tsendrecord)*500);
sendst.position:=0;
serversocket1.socket.connections[0].sendstream(sendst);
接收端:
recelength:=clientsocket1.socket.receivelength;
recst.setsize(recelength);
clientsocket1.socket.receivebuf(recst,recelength);
recst.read(rece,recelength); //将流原样写入接收数组是否正确,如果不正确应该怎么处理?
ss:string[9];
...
end;
send:array[1..10000] of Tsendrecord;
rece:array[1..10000] of Tsendrecord;
sendst,recst:Tmemorystream;
发送端:
sendst:=Tmemorycreat;
sendst.write(send,sizeof(Tsendrecord)*500);
sendst.position:=0;
serversocket1.socket.connections[0].sendstream(sendst);
接收端:
recelength:=clientsocket1.socket.receivelength;
recst.setsize(recelength);
clientsocket1.socket.receivebuf(recst,recelength);
recst.read(rece,recelength); //将流原样写入接收数组是否正确,如果不正确应该怎么处理?