【发布时间】:2019-04-03 20:03:41
【问题描述】:
我需要在使用 TIdTCPServer 和 TIdTCPClient 制作的聊天应用中进行简单修复。请,无需额外代码,仅用于发送和接收文本。
procedure TServerApp1.Button1Click(Sender: TObject);
var
AContext : TIdContext;
begin
AContext.Connection.Socket.Write(length(newMSG.Text));
AContext.Connection.Socket.Write(newMSG.Text);
end;
【问题讨论】: