服务端 :
得用多线程:
constructor TActionThread.create (whatin:integer;socketin:TCustomWinSocket;indexin:integer);
begin
what:=whatin;
socket:=socketin;
index:=indexin;
inherited Create(False);
end;procedure TActionThread.Action(index:integer;socket:TCustomWinSocket;index:integer);
{ }procedure TActionThread.Execute;
begin
Action(index,socket,index);
end;I hope that it is helpful !!
得用多线程:
constructor TActionThread.create (whatin:integer;socketin:TCustomWinSocket;indexin:integer);
begin
what:=whatin;
socket:=socketin;
index:=indexin;
inherited Create(False);
end;procedure TActionThread.Action(index:integer;socket:TCustomWinSocket;index:integer);
{ }procedure TActionThread.Execute;
begin
Action(index,socket,index);
end;I hope that it is helpful !!
解决方案 »
- 散分喽~~~
- delphi 除法 "/" 与 div 的不同
- 求一類似 GetFileVersionInfo 的函數,返回Exe文件開發的公司名稱
- 初学HOOK,我编了一个按键精灵程序,有一个小问题.请大家帮帮忙.
- 请问关于Delphi的Table的问题?
- WIN32已经被NET取代?
- 如何关于判断整型数是否为空?
- Delphi如何做到监视一个WEB窗口的运行,并能截取WEB窗口发往网站的消息?在线等候...
- ★★★★★救命啊!一个奇怪的问题:自建的通用过程中难道不能包含有控件名吗?
- 各位男俠女俠,我現將九陽真經公布,以示切磋之意...
- 如何在自己设计的程序中关闭系统中正在运行的一个程序或对话框(不是自己的哪个程序)?有思路吗?谢谢
- 我做了個聊天室,在局域網可以多人同時聊天,如果我要把它升級到廣域網上,還要做些什麼呢?
Socket: TCustomWinSocket);
begin
//根据Socket.RemoteAddress你可以知道是谁发送来的
//再开辟不同的缓冲来存放不同的数据
//和一对一其实没有多大区别
end;
用IP地址来判断不好,因为一台机器上可以开几个程序来和服务器连的