English 中文(简体)
。 网络图书馆
原标题:.NET Network Library

I ve been looking for a decent network library for C#. It is going to be used with XNA 3.1, and .NET Framework 3.5. The multi-player style is going to be Server and Client. Currently I have been looking into Lidgren Library Network, but it seems outdated.

任何人都对一个良好的网络图书馆提出了一些很好的建议。 它应当能够随时处理30+客户链接。

最佳回答

你的联系的确已经过时,但如果你读到该网页,就会把你引向新的版本:

问题回答

虽然没有任何东西阻止你撰写所有低层次的网络密码,但使用图书馆无疑是节省时间和压力的巨大途径,因此,你可以更好地利用时间改进自己的应用。

http://www.networkcomms.net>networkComms.net。 它有许多复杂的特征(例如序列化、压缩和加密),但鉴于你提到多少连接,它能够处理1千+的传输率。 how to establish a briefuser Service application,但简言之,您可以寄送并接收如下内容。

派遣:

//This is the simplest way to send with more advanced options also available
//Parameters are message type, IP address, port and the object to send
NetworkComms.SendObject("Message", "127.0.0.1", 10000, "Networking in one line!")

接收:

//We need to define what happens when packets are received.
//To do this we add an incoming packet handler for 
//a  Message  packet type. 
//
//This handler will automatically convert the incoming raw bytes into a string 
//(this is what the <string> bit does) and then write that string to the 
//local console window.
NetworkComms.AppendGlobalIncomingPacketHandler<string>("Message", (packetHeader, connection, incomingString) => { Console.WriteLine("
  ... Incoming message from " + connection.ToString() + " saying  " + incomingString + " ."); });

//Start listening for incoming  TCP  connections. The true 
//parameter means try to use the default port and if that 
//fails just choose a random port.
//See also UDPConnection.StartListening()
TCPConnection.StartListening(true);

申斥: 图书馆开发商之一。

你似乎正在看错的地方。 你们看不到“网络框架”本身。

如何利用全球合作框架? 如何使用<代码>TcpListener?

你们需要的是哪些措施不提供?

周转基金是一种可能性,但对于这种情形而言,它可能是一种比值重的加权。 NET Sockets, OTOH, 经常太低;它们并不容易地“兼容”,只是插图(在能够正确使用Socket类别之前必须学到联网和多读)。

我写了一个图书馆,Nito.Async.Sockets,它是Nito.Async的一部分。 它从编程中删除了多面的考虑,还包括一个处理message framing_keepalives





相关问题
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. ...

热门标签