有没有采用ctBlocking方式收数据的ClientSocket的例子,急需,要测试通过的
解决方案 »
- 请问大家DCOM和Socket有什麼區別?
- 如何自动加1
- 用Delphi 完成 web service 但..請幫忙
- 图形问题。请帮帮。15分 ,知道的人很简单解决。
- 关于数据更新
- 请教各位,有没有这么一个控件,使应用程序能与SQL交流 图文并茂 的数据,第三方控件也可。
- 一个很简单的问题但是我解决不了?很急??在线?
- 大家来看看这个问题
- 100分捧上。我在MSDN中找到了我想要的东东,但是太多了,我不可能要一页一页的下载吧。而且在MSDN光盘中没有那样的资料的。
- 过滤网址的BHO插件 帮忙编译下!
- BlobStream.Read()方面的问题
- 在Delphi 中拷貝工作表WorkSheet的問題
http://www.nssoft.net/delphihelp.asp
TheStream: TWinSocketStream;
buffer: string;
begin
{ create a TWinSocketStream for reading and writing }
TheStream := TWinSocketStream.Create(ClientSocket1.Socket, 60000);
try
{ fetch and process commands until the connection or thread is terminated }
while (not Terminated) and (ClientSocket1.Active) do
begin
try
GetNextRequest(buffer); { GetNextRequest must be a thread-safe method } { write the request to the server }
TheStream.Write(buffer, Length(buffer) + 1);
{ continue the communication (eg read a response from the server) }
...
except
if not(ExceptObject is EAbort) then
Synchronize(HandleThreadException); { you must write HandleThreadException }
end;
end;
finally
TheStream.Free;
end;
end;