C# TCP 第一个消息延迟

发布于 2024-08-26 06:49:16 字数 201 浏览 1 评论 0原文

您好,

我正在使用 C# 中的套接字编写一个套接字程序(异步)。

问题是,当客户端连接到服务器时,它发生得很快。然后..

当发送第一条消息时,响应会出现延迟。

这只发生在通过连接发送的第一个数据上。 boh 客户端和服务器都会受到这种行为的影响。

这是什么延迟?有办法摆脱这个吗?

非常感谢。

greetings,

i am writng a socket program using sockets in c# (asynchronous).

the issue is, when a client connects to the server it kinda happens quiet fast. then..

when the first message is sent there is a delay in responding.

this only happens to the very first data being sent over the connection. and boh client and server suffers from this behaviour.

what is this delay? is there a way to get rid of this?

many thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不忘初心 2024-09-02 06:49:16

我通过在节点之间进行握手解决了这个问题。它更像是一种黑客而不是解决方案。

i solved the issue by doing a handshake between the nodes. its more of a hack than a solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文