Click here to Skip to main content
15,892,746 members
Articles / Programming Languages / C#

Design and Implementation of a High-performance TCP/IP Communications Library

Rate me:
Please Sign up or sign in to vote.
4.89/5 (57 votes)
3 Aug 2008CPOL13 min read 155.4K   4.4K   284  
A TCP/IP Communications Library, designed to handle client-server data transmission for a massive multiplayer online game.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using BrainTechLLC.ThreadSafeObjects;

namespace BrainTechLLC.EmlenMud.Interfaces
{
   [Browsable(true), TypeConverter(typeof(ExpandableObjectConverter))]
   public interface ISchedulingEngine
   {
      /// <summary>
      /// Fires up the scheduling engine
      /// </summary> 
      void StartSchedulingEngine();

      /// <summary>
      /// Schedules an event to be executed by the scheduling engine at a specified time
      /// </summary>
      /// <param name="eventToExecute"></param>
      void ScheduleEventToExecute(IExecutableWorkItem eventToExecute);

      /// <summary>
      /// Count of work items/events executed
      /// </summary>
      long WorkItemsExecuted { get; set; }

      /// <summary>
      /// Setting WantExit will begin the shutdown process of the scheduling engine
      /// </summary>
      bool WantExit { get; set; }      

      /// <summary>
      /// Keeps track of the current date/time
      /// </summary>
      DateTime CurrentDateTime { get; set; }

      /// <summary>
      /// Returns an array of ISupportsCount, which can be used to ge the count of items in each work queue
      /// </summary>
      ISupportsCount[] WorkItemQueueCounts { get; }

      /// <summary>
      /// A list of exceptions that have occurred trying to execute work items
      /// </summary>
      List<Exception> Exceptions { get; }
   }
}

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) Troppus Software
United States United States
Currently working as a Senior Silverlight Developer with Troppus Software in Superior, CO. I enjoy statistics, programming, new technology, playing the cello, and reading codeproject articles. Smile | :)

Comments and Discussions