问题解决,但很笨。
服务端是Socket.SendText(user1#user2#user3
)
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
var s,s1:string;
i:integer;
begin
ListBox1.Items.Clear;
s:=ClientSocket1.Socket.ReceiveText;
for i:=1 to Length(s)do
if s<>'#' then
begin
s1:=s1+s;
end
else
begin
ListBox1.Items.Append(s1);
s1:='';
end;