【发布时间】:2011-05-07 09:06:00
【问题描述】:
我是 Indy 的新手,我想用它构建一个简单的代理服务器。这是一个相当大的图书馆,我只是不知道从哪里开始。当客户端连接到服务器时,OnExucute 启动并接收客户端连接作为参数(AContext.Connection)。
我想做以下事情:
[client connection] := AContext.Connection
read host/port from [client connection]
[remote connection] := connect to host/port
while both connections alive:
if data available in [client connection]:
read data from [client connection]
write data to [remote connection]
if data available in [remote connection]:
read data from [remote connection]
write data to [client connection]
问题是我应该使用哪些功能? Connection 对象中有 IOHandler 属性,其中包含大量属性。请帮忙。
我正在使用 Delphi2010 附带的 Indy。
【问题讨论】:
标签: delphi networking proxy delphi-2010 indy