可以组织成一个结构发送,也可以分别发送
type
testrecord=packed record
count:byte;
content:array[0..19] of char;
end;
var
data:testrecord;
data.count:=20;
data.content:='asasasa';
sendbuf(socket,data,sizeof(testrecord))
或者直接发送
var
count:byte;
content:array[0..19] of char;
connt:=20;
content:='asasas';
sendbuf(socket,byte,1);
sendbuf(socket,content,20)