什么是惯用的方式做在Delphi异步套接字编程? [英] What's the idiomatic way to do async socket programming in Delphi?

查看:121
本文介绍了什么是惯用的方式做在Delphi异步套接字编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是正常的方式人民德尔福使用Windows风格的重叠的异步套接字编写网络code I / O?

What is the normal way people writing network code in Delphi use Windows-style overlapped asynchronous socket I/O?

下面是我之前研究这个问题:

Here's my prior research into this question:

href=\"http://indyproject.org/\">印成分似乎完全同步的

The Indy components seem entirely synchronous. On the other hand, while ScktComp unit does use WSAAsyncSelect, it basically only asynchronizes a BSD-style multiplexed socket app. You get dumped in a single event callback, as if you had just returned from select() in a loop, and have to do all the state machine navigation yourself.

在.NET形势相当更好,与Socket.BeginRead / Socket.EndRead,那里的延续,是直接传递给Socket.BeginRead,而这也正是你再爬起来。的延续codeD作为一个封闭显然有需要,而所有上下文等等。

The .NET situation is considerably nicer, with Socket.BeginRead / Socket.EndRead, where the continuation is passed directly to Socket.BeginRead, and that's where you pick back up. A continuation coded as a closure obviously has all the context you need, and more.

推荐答案

有关异步的东西尝试ICS

For async stuff try ICS

http://www.overbyte.be/frame_index.html ?redirTo = /产品/ ics.html

这篇关于什么是惯用的方式做在Delphi异步套接字编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆