StreamSendWrapper

It may be desirable to send partial data held on disk rather than from memory. This can be easily achieved by using the provided wrapper object StreamSendWrapper: //Create a filestream linked to the data on disk FileStream diskData = new FileStream("testfile.dat", FileMode.Open); //Wrap the filestream in a thread safe stream which enables // thread safe […]

Continue Reading »

Multiple Adapter Support

NetworkComms.Net’s functionality is totally customisable for a general selection of network adaptors. Multiple adaptors can be included when listening for incoming connections by specifying IPAddress.Any for the desiredLocalEndPoint parameter, i.e. //Will listen for new TCP connections on all available adaptors //using a randomly selected port. Connection.StartListening(ConnectionType.TCP, new IPEndPoint(IPAddress.Any, 0)); //Will listen for new UDP connection on […]

Continue Reading »

Send Receive Options

A large number of methods, such as Connection.SendObject and NetworkComms.AppendGlobalIncomingPacketHandler, take an optional SendReceiveOptions object parameter. SendReceiveOptions objects contain all of the options required to modify the sending and receiving of data. Among other features, which we introduce below, it primarily allows you to customise the serialisation, and using the nomenclature of data processing, steps such as […]

Continue Reading »

TCP & UDP Connections

NetworkComms.Net seamlessly supports both TCP and UDP IP transport protocols. An extensive discussion of scenarios where each type might be preferable can be found here. You can easily choose between the different transport protocols when creating connections: //Create a connectionInfo object ConnectionInfo connInfo = new ConnectionInfo("192.168.0.1", 10000); //Create a new TCP connection using default options //A […]

Continue Reading »

Custom Objects

One of the great features of this network library is the ability to send custom objects and at the same time easily incorporate compression, encryption etc. This is in part due to the features made available from serialisation libraries such as protobuf-net. Demonstrating this functionality is the primary goal of the AdvancedSend example included in the […]

Continue Reading »

Synchronous Send and Receive

At its core networking is asynchronous and that behavior is, to an extent, reflected in the implementation of NetworkComms.Net. In our continuing endeavour to provide the most flexible .net network library on the planet we have also provided features which make the synchronous request for data and the corresponding response really straight forward. In the […]

Continue Reading »

Creating A WPF File Transfer Application

Note: This tutorial is fairly extensive, if you are after something shorter please also see our Getting Started and How To Create a Client Server Application In Minutes tutorials. Note: This example is also included in the example bundle when you download NetworkComms.Net. You are welcome to open that example and simply follow this tutorial to see how it was put […]

Continue Reading »

UDP Broadcasting

One of the great strengths of UDP (User Datagram Protocol) is broadcasting. This feature allows a single sent packet (datagram) to be to received by multiple peers on the same network. The alternative would be an independent send for each desired destination. The following scenarios are several examples when you might consider using UDP broadcasts: […]

Continue Reading »

Using Encryption

NetworkComms.Net makes it really easy to add pre-shared key (PSK) encryption to secure your data transmissions.  In this tutorial we will demonstrate how just 4 extra lines of code are required  to enable PSK encryption on a connection. Some considerations that you should also take when using PSK encryption will also be discussed. Server Side If you […]

Continue Reading »

Exception Handling

Networking by its very nature is asynchronous, i.e. almost anything can happen in any order at any time. This was one of the primary difficulties we have attempted to simplify when writing our network library. We have attempted to keep our network library as transparent as possible when it comes to errors and the aim […]

Continue Reading »