窗口移动网络编程 [英] Network Programming for window mobile

查看:94
本文介绍了窗口移动网络编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我对TCP套接字有一些问题.我使用了TCPListener/TCP Client.当我在服务器(PC)和客户端(PPC)之间发送和接收字符串时,我使用了byte [].小于8kb的字符串没有问题.但是,当我从服务器向客户端发送超过8kb的字符串时,客户端仅收到8kb.我想知道在这种情况下需要什么流? byte []/streamreader或二进制tream ... etc来发送/接收大于8kb的字符串.
非常感谢!
祝你有美好的一天.

Hi all!
I have some problem with TCP socket. I used TCPListener/ TCP Client. When I sent and received string between server (PC) and client (PPC), I used byte[]. It is no problem with string less than 8kb. However, When I sent a string more than 8kb from server to client, client only received 8kb. I want to know what stream I need in this situation? byte[]/streamreader or binary tream...etc to sent/received a string more than 8kb.
Thank you a lot!
Have a nice day.

推荐答案

存在这种限制,请参见 http://en.wikipedia.org/wiki/TCP_window_scale_option [ ^ ].

您需要相应地限制消息的大小.您组织应用程序级协议以较小的数据块传递数据.根据系统的不同,您可以增加接收窗口的大小,请参见下面的链接.

在Microsoft系统中使用TCP接收窗口大小和窗口缩放的操作在此处进行了说明:
http://msdn.microsoft.com/en-us/library/ms819736.aspx [ ^ ].

—SA
Such limit exists, see http://www.babinszki.com/Networking/Max-Ethernet-and-TCP-Throughput.html[^]. This is about the minimal TCP windows size, for TCP stacks which do not support RFC 1323 extensions. For TCP window scale option and system configuration, see http://en.wikipedia.org/wiki/TCP_window_scale_option[^].

You need to limit the size of your messages accordingly. You organize your application-level protocol to pass data in smaller chunks. Depending on the system, you can increase the receive window size, see the link below.

Working with TCP receive window size and window scaling in Microsoft systems is explained here:
http://msdn.microsoft.com/en-us/library/ms819736.aspx[^].

—SA


这篇关于窗口移动网络编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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