Click here to Skip to main content
15,885,278 members
Articles / General Programming / Threads

A Simple UDP Messaging Client Toolkit

Rate me:
Please Sign up or sign in to vote.
4.60/5 (4 votes)
15 Oct 2010CPOL5 min read 31.3K   1.4K   23  
A simple set of classes to make creating Peer to Peer messaging easy using UDP. Features built-in message concatenation and delivery receipts for reliable transmission.
using System;
using System.Net;


namespace Globitrust.Net.P2PMessaging
{
	/// <summary>
	/// A class representing the arguments passed back to the user after a message was sent.
	/// </summary>
	public class MessageReceivedEventArgs
	{

		#region Fields

		/// <summary>
		/// The identifier of the message.
		/// </summary>
		public UInt32 MessageID;

		/// <summary>
		/// The data that was received.
		/// </summary>
		public byte[] Data;

		/// <summary>
		/// The host that sent the message.
		/// </summary>
		public IPEndPoint RemoteHost;

		#endregion

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
South Africa South Africa
B.Sc (Comp. Science)
17 years software development experience.

Adventure junkie & keen golfer.

Comments and Discussions