English 中文(简体)
SocketLinksWindows
原标题:Socket Connections Windows

我的客户服务器应用程序载于C#。

服务器在指定港口收听。 客户将数据推向该服务器,其余客户则把这些数据拉开。 同样,所有客户都使用这一服务器。

我想知道,在连接数量上是否有任何限制,因为数据没有损失,可以进行可靠的数据交流? 传送到服务器、然后转发给客户的数据的典型规模约为40千分之四。

您能否帮助我了解在设计这种解决办法时应考虑哪些参数?

最佳回答

Upstream bandwidth will be your biggest bottleneck. If by "40 kbps" you mean kilo-BITS per second instead of kilo-BYTES per second then that gives you 5 KB/s. If your upstream bandwidth is 1 mega-BIT per second (128 kilo-BYTES per second) then you can only have around (128/5) 25 clients.

对于允许在港口问题上建立许多联系,吉大港港务局的服务器在这样做时没有问题。

问题回答

实际上,一个目录将无法处理服务器的所有数据。 在服务器上,你有一张听力片,只是为了接受客户的接线。 然后,每个客户都有一个链接/电话。

运行系统将努力在所有相关的袖珍(乡村和其他应用)中公平分配带宽。 UDP的备案量高于TCP的备案量。

只要网络带宽能够处理,服务器就能够像你一样对待客户。 如果看望几个客户的话,你可以使用read子/cl,而如果你去很多,我就建议你看上去做的是非同步处理(BeginXX/EndXX方法)。

如果带宽是个问题,那么你就应当把发送和接收(最容易的方法是使用Thread.Sleep)与网络连接分开。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签