Writing a Server using EasySocket
1. Add reference to the EasySocket.dll in your project
2. Import the namespace
using SocketWrapper;
3. Create the EasySocket class object (per your required scope)
EasySocket MySocketObject;
4. Initialize the object (per your initialization methods)
MySocketObject= new EasySocket("MyIPAddressOrLocalhost", MyIntegerPort, SocketMode.Server, false);
5. Set Max possible Data Size (in bytes - default 1024)
MySocketObject.SetSocketOptions(SocketOption.SocketBuffer, 2048);
6. Handle the Events you are interested in
MySocketObject.DataReceived += new EasySocketDataEventHandler(socketObject_DataReceived);
MySocketObject.ClientConnected +=new EasySocketEventHandler(socketObject_ClientConnected);
MySocketObject.ClientDisconnected +=new EasySocketEventHandler(socketObject_ClientDisconnected);
7. Start Listening (Start Server)
MySocketObject.Start();
// See Just 7 Steps