Click here to Skip to main content
13,045,920 members (47,973 online)
Click here to Skip to main content
Add your own
alternative version


60 bookmarked
Posted 6 Sep 2005

EasySocket - Flexible and easy implementation of client-server architecture in C#

, 23 Feb 2006
Rate this:
Please Sign up or sign in to vote.
Using .NET Socket on TCP to create events oriented client-server behaviour.

Sample Image - EasySocketDocument.jpg


<pp>My first encounter with Windows Sockets was about two months ago with MFC. At that time I simply wanted to experience some TCP\IP programming just before my next semester. That was the ugliest thing I've ever seen and I switched back to .NET. Although it was a lot easier I couldn't find objects that would give me client server behaviour right away and still will keep the flexibility of the Socket object (not to mention an event oriented one). So I took on myself a little project, 3-4 days I think. And I gave life to the EasySocket namespace and the EasyClient, and EasyServer classes.

EasyServer and EasyClient

EasyServer represents the server entity. It has very flexible and useful features. It's an event oriented object and sending any type of serializable object can be done in one line. Most of the methods have both synchronous and asynchronous versions (runs on separate threads). EasyServer was designed with EasyClient and they have a special functionality together (like communication testing), but with proper programming, it can also communicate with any client application. You can get information about the connected clients, their last transition time and more...

EasyClient is the client entity and was written with the same spirit of event oriented programming and can send\get data, make connection tests, connection status and more.

Usage Instructions

The downloadable source code has the EasySocket solution (*.sln file). Its output is a DLL file and an XML comments file. To use it in your own project, simply add to the project a reference to the EasySocket.dll file.


I've spent a great deal of time commenting the code and generated detailed and easy to use documentation (HTML & WinHelp) and I recommend reading it in case you intend to change or understand the code. There are two types of documentation: one for client programmers (those who are using the DLL only), and second for programmers who want to edit the code (includes details about private members and private functions). Have fun...


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer Rontal Applications
Israel Israel
Born and raised in Israel, I've caught the programming virus at the age of 15.
Since than I can't stop coding.

You may also be interested in...

Comments and Discussions

GeneralClient can't connect Server on the Internet Pin
limdim24-Oct-07 23:59
memberlimdim24-Oct-07 23:59 
QuestionHow to know IP clients connected to EasyServer ? Pin
jopomo4-Oct-07 2:28
memberjopomo4-Oct-07 2:28 
AnswerRe: How to know IP clients connected to EasyServer ? Pin
JadBenAutho5-Oct-07 0:39
memberJadBenAutho5-Oct-07 0:39 
GeneralRe: How to know IP clients connected to EasyServer ? Pin
jopomo10-Oct-07 20:34
memberjopomo10-Oct-07 20:34 
QuestionDo you have an Easy Socket update for 2005? Pin
terryd27-Dec-06 16:35
memberterryd27-Dec-06 16:35 
AnswerRe: Do you have an Easy Socket update for 2005? Pin
JadBenAutho29-Dec-06 0:34
memberJadBenAutho29-Dec-06 0:34 
GeneralMake Thread-Safe Calls to Windows Forms Controls Pin
Akleinek2-Oct-06 6:38
memberAkleinek2-Oct-06 6:38 
GeneralRe: Make Thread-Safe Calls to Windows Forms Controls Pin
JadBenAutho3-Oct-06 0:23
memberJadBenAutho3-Oct-06 0:23 
GeneralRe: Make Thread-Safe Calls to Windows Forms Controls Pin
Drewcrewof28-Oct-06 7:55
memberDrewcrewof28-Oct-06 7:55 
GeneralSome corrections Pin
flops4222-Feb-06 10:20
memberflops4222-Feb-06 10:20 
GeneralRe: Some corrections Pin
JadBenAutho22-Feb-06 21:29
memberJadBenAutho22-Feb-06 21:29 
GeneralAbout UseSmartManagement Pin
Bruno Saboia de Albuquerque8-Dec-05 6:58
memberBruno Saboia de Albuquerque8-Dec-05 6:58 
GeneralRe: About UseSmartManagement Pin
JadBenAutho8-Dec-05 20:39
memberJadBenAutho8-Dec-05 20:39 
GeneralDemo Shutdown Problem Pin
lberman7-Sep-05 3:53
memberlberman7-Sep-05 3:53 
GeneralRe: Demo Shutdown Problem Pin
JadBenAutho7-Sep-05 8:50
memberJadBenAutho7-Sep-05 8:50 
QuestionProblem running demo Pin
lberman6-Sep-05 11:03
memberlberman6-Sep-05 11:03 
AnswerRe: Problem running demo Pin
JadBenAutho6-Sep-05 20:06
memberJadBenAutho6-Sep-05 20:06 
GeneralRe: Problem running demo Pin
lberman7-Sep-05 3:39
memberlberman7-Sep-05 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 23 Feb 2006
Article Copyright 2005 by JadBenAutho
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid