当执行与TCP套接字的async_write,当调用的处理程序? [英] When performing an async_write with a tcp socket, when is the handler called?

查看:105
本文介绍了当执行与TCP套接字的async_write,当调用的处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这只是async_write与TCP套接字的行为一个简单的问题。基本上,具有一TCP套接字时,不写处理获得当数据被写入到插座调用,或者当从目的地​​收到ACK

This is just a simple question of how async_write behaves with tcp sockets. Basically, when working with a tcp socket, does the write handler get called when the data gets written to the socket, or when an ack is received from the destination?

推荐答案

据我所知,该处理程序得到尽快的数据被写入套接字的内核缓冲区调用。

AFAIK, the handler gets called as soon as data are written into the socket's kernel buffer.

这篇关于当执行与TCP套接字的async_write,当调用的处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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