.NET Network Library

c# tcp library
lidgren
c# socket library
litenetlib
c# server library
vb net networking
.net network service
c# communication 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.

Anyone got some good suggestions for a good network library. It should be able to handle easily 30+ client connections at a time.

Your link is indeed outdated; but if you read the page it will direct you to the newer version: http://code.google.com/p/lidgren-network-gen3/

Your link is indeed outdated; but if you read the page it will direct you to the newer version: http://code.google.com/p/lidgren-network-gen3/. Our C# network library is available across a large range of platforms including .Net2+, Mono, Unity3d, Xamarin.iOS, Xamarin.Android, Windows Phone 8, Windows RT etc. High Performance Support for 1000+ connections with data rates of 1Gbps+.

Although there is nothing stopping you from writing all of the low level networking code yourself, using a library is definitely a great way to save loads of time and stress, time which you can then better spend improving your own application.

A library not already mentioned here is networkComms.net. It has a plethora of sophisticated features (such as serialisation, compression and encryption) but given you mention number of connections specifically it is capable of handling 1000+ connections with transfer rates of 1Gbps+. There is a simple article on how to create a quick client server application but in brief you could send and receive as follows.

To send:

//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!")

To receive:

//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("\n  ... 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);

Disclaimer: I'm one of the developers for this library.

NET Framework provides a layered, extensible, and managed implementation of Internet services that can be quickly and easily integrated into  The features offered by our network library can be easily extended by creating your own extensions. The following extensions are already available for NetworkComms.Net: Protobuf Serialisation – Easily serialise your own custom objects without the hassle of writing your own serialisation stages.

You seem to be looking in the wrong place. You don't seem to have looked in the .NET Framework itself.

What about using WCF? What about using TcpListener?

What do you need that these do not provide?

Azure Virtual Network libraries for .NET. 10/19/2017; 2 minutes to read. In this article. Overview; Management library; Samples. Overview. The Azure Virtual  The Microsoft .NET Framework provides a layered, extensible, and managed implementation of Internet services that can be quickly and easily integrated into your applications. Your network applications can build on pluggable protocols to automatically take advantage of new Internet protocols, or they can use a managed implementation of the Windows socket interface to work with the network on the socket level.

WCF is one possibility, though it may be a bit heavyweight for this scenario. .NET Sockets, OTOH, are often too low-level; they're not an easy "component" to just plug in (both networking and multithreading must be learned well before the Socket class can be used correctly).

I wrote a library, Nito.Async.Sockets, which is part of Nito.Async. It removes multithreading considerations from socket programming, and also includes a higher-level abstraction that handles message framing and keepalives.

Network. The Network library makes it possible to read and write data across machines on the Internet. It allows the creation clients and servers. A server  GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

How is lidgren outdated? It is still the only major player in the .NET space for gaming networking.

This article contains a list of libraries that can be used in .NET languages. These languages It implements a number of genetic, fuzzy logic and machine learning algorithms with several architectures of artificial neural networks with  NeuralNetwork.NET is a .NET Standard 2.0 library that implements sequential and computation graph neural networks with customizable layers, built from scratch with C#. It provides simple APIs designed for quick prototyping to define and train models using stochastic gradient descent, as well as methods to save/load a network model and its metadata and more.

Networking is a networking library written in C# whose purpose is to: Abstract away the repetitive tasks which you have to do with vanilla .NET  As mentioned previously, the Tor network is not designed for immediate HTTP proxy communications. Instead, a web-proxy must implemented. The Tor.NET library implements a custom proxy system to handle the conversion from standard SOCKS communications to HTTP. In order for the system to work, a TCP listener is created on a configurable port.

Introducing HumbleNet: a cross-platform networking library that works in the browser With a side of net neutrality and privacy advocacy. The C# guide provides many resources about the C# language. This site has many different audiences. Depending on your experience with programming, or with the C# language and .NET, you may wish to explore different sections of this guide. For brand-new developers: Start with the Introduction to C# tutorials.

TCP event driven networking library for vb.NET C# and managed c++. Welcome to the Nading.Network.Library. UPDATE: added new libs that now include the  The runtime includes everything you need to run existing apps/programs built with .NET Framework. Download .NET Framework 4.7.2 Runtime. Developer Pack. The developer pack is used by software developers to create applications that run on .NET Framework, typically using Visual Studio. Download .NET Framework 4.7.2 Developer Pack

Comments
  • would it be ok if the library were written in VB.NET?
  • @John Saunders: If the library is a compiled a .Net assembly, it will be in CIL and so it won't matter what the source language is.
  • @Callum: thanks, I know that. I asked Mark, since he asked for a "C# Network Library".
  • He asked for a network library FOR C#, not one written in C#.
  • the lidgren library is solid, I've used it in a production setting with good success!
  • Lidgren is now migrating to github: github.com/lidgren/lidgren-network-gen3
  • Pretty much all of your posts are advertisements for what is obviously your website, and none of them disclose that fact.
  • @AndrewBarber - For the record I am one of the developers for networkComms.net. I have never tried to hide that, I will amend my profile to clarify that now.
  • Please be sure to read the FAQ on Self-Promotion carefully. Specifically, see the part where it says if many of your posts are promotional, you are probably here for the wrong reason. Also note that it is required that you post a disclaimer every time you link to your own site/product.
  • @AndrewBarber - Understood, I was not aware of the of the disclaimer requirement.
  • Advertising a site for paid library, which hides the fact that it's a paid library behind "Download" link, which takes you to a "Please select package!" page with prices listed ... I'd prefer if it didn't try to hide the fact on quick look and instead had a "Purchase" link.
  • I would not recommend Nito.Async as of this writing(v1). Quote from Nito.Async site "The current Nito.Async.Sockets API has been frozen. A new (v2) API will be developed that provides better separation between protocol components (e.g., type of message framing, keepalive system, etc., will all be orthogonal). The new API may be based on the Rx framework, but is more likely to be tied into the .NET 4.0 Task Parallel Library."
  • Nito.Async.Sockets is still usable; the v2 API has been planned for years but I just haven't had time to do it.
  • While vanilla socket library can be sufficient for some people, people who doesnt like to manage resources efficiently should either look for network library or prepare to write a lot of resource management code(scaling, minimize garbage collector, multithread, load balancing, network error handling etc.).