C
carem1
Unregistered / Unconfirmed
GUEST, unregistred user!
由于放了很久都没有回答,所以我改了一下内容,但是主体没变~!!
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
var
actbyte,MyReceviceLength: integer;
MyBuffer: array[0..10000] of byte; {设置接收缓冲区}
DriverList:TStringList;
begin
if (temptxt='list') then
begin
MyReceviceLength := socket.ReceiveLength; //读出包长度
if ClientSocket1.Active then
Socket.ReceiveBuf(MyBuffer, MyReceviceLength); //接收数据包并读入缓冲区内
MyTempStream.Write(MyBuffer, MyReceviceLength); //将数据写入流中
//写到这里不会写了~!!东西是传过来了,但是怎么将mytempstream里面的东西写到DriverList里面阿??
end;
end;
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
var
actbyte,MyReceviceLength: integer;
MyBuffer: array[0..10000] of byte; {设置接收缓冲区}
DriverList:TStringList;
begin
if (temptxt='list') then
begin
MyReceviceLength := socket.ReceiveLength; //读出包长度
if ClientSocket1.Active then
Socket.ReceiveBuf(MyBuffer, MyReceviceLength); //接收数据包并读入缓冲区内
MyTempStream.Write(MyBuffer, MyReceviceLength); //将数据写入流中
//写到这里不会写了~!!东西是传过来了,但是怎么将mytempstream里面的东西写到DriverList里面阿??
end;
end;