|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SocketServerLib.Message;
namespace BasicClientServerLib.Message
{
/// <summary>
/// Basic Message. Implements the AbstractMessage. The message header class is BasicHeader.
/// </summary>
public class BasicMessage : AbstractMessage
{
/// <summary>
/// Constructor
/// </summary>
public BasicMessage()
: base()
{
}
/// <summary>
/// Constructor for a message.
/// </summary>
/// <param name="clientUID">The client UID</param>
/// <param name="buffer">The message buffer</param>
public BasicMessage(Guid clientUID, byte[] buffer)
: base()
{
if (buffer == null)
{
buffer = new byte[0];
}
header = new BasicHeader(clientUID, Guid.NewGuid(), buffer);
body = buffer;
}
/// <summary>
/// Return an empty BasicHeader instance.
/// </summary>
/// <returns>The BasicHeader instance</returns>
protected override AbstractMessageHeader GetMessageHeaderInstance()
{
return new BasicHeader();
}
}
}
|
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.
I’m an IT Project Manager for an Italian Betting Company and over the last 2 years I acquired experience in Betting area.
I have developed code in different object oriented languages (C#, C++, Java) for more than 10 years using a set of technology such as .Net, J2EE, multithreading, etc…