C++ CServerFramework

Joined
Feb 3, 2007
Messages
320
Reaction score
67
I've made a ServerFramework for C++ for anyone who would like to create an emulator to use.
It supports 65536 client's to start with (edit for more..).
The framework uses two threads only, one for accepting clients, another for reading clients.
Example code is also included in the source (Microsoft Studio 2010 Ultimate)
You will need to include serverframework.h and global.h to your project in order to use.
You will also need to add ws2_32.lib to your library dependencies in order for Windows Socket's to work.

This does not implement anything related to flyff, it's a pure framework for handling connections and data reading from clients.

Hope it could be some sort of base if someone would like to create an emulator :thumbup1:

You can assign your own code (flyff session id and username etc), by setting the tag on a CClient. The tag is of type void* which means anything can be assigned to it, and it also requires you to remember what you assigned because there's no way to check (you can only check if it is assigned or not). In the example the tag is assigned an array of bytes (char*) that holds the hex of an unsigned integer to identify if the client has authenticated or not. The protocol represented in the example is DC++.



Added Net Debugger, a program I made to debug servers.

Updated! Compiled with required libraries now.
 
Last edited:
Back