Search blog.co.uk

About me

tibbar

tibbar

Calendar

<<  <  July 2008  >  >>
Mo Tu We Th Fr Sa Su
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Last comments

linux server framework

by tibbar @ 2006-10-19 - 23:13:23

hmm here's my first linux project, a c++ framework for developing server apps.

You can inherit from CGenericServer and override the following virtual functions:

virtual void ProcessCommand(char* buf, int clientNumber);
virtual bool Authenticate(int clientNumber);

a simple example is shown via the class CBackdoor that illustrates how you can implement authentication and override the default command processing (by default it will allow commands "quit" and "shutdown").

In GenericServer.h the preprocessor:

#define MAX_CLIENTS 3

is used to specify the max number of concurrent connections. Beyond this connections will be rejected until the queue shortens.

It's pretty simple and easily extended. I might consider adding a LINUX / WIN32 preprocessor and possibly even port it to windows kernel mode (as in the kernel ircbot).

If I do this, it will allow kernel mode servers to be written with ease.

Useful additions to the base class might be BinaryTransferSend/Recieve(char* filename) and probably a load of other stuff i can't think of right now.

It's built under KDevelop, but i guess you can compile from command line using gcc if you don't like this.

You can download it here:

GenericServerFramework


 
 

Trackback address for this post:

authimage

Comments, Trackbacks: Hide subcomments

M03 [Visitor]

04/01/07 @ 15:43

Great work with this tib, I actually am going to have use for this in the future, can't wait to see more from you bud.

Leave a comment :

Your email address will not be displayed on this site.
Your URL will be displayed.
Allowed XHTML tags: <!, p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, a, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small, img>
URLs, email, AIM and ICQs will be converted automatically.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)
All comments on this blog will be moderated by the author.
Validation code:
Please enter the above code here:
For protection from spambots (case-sensitive).

Recent Posts

  1. Reflecting on better times
    by tibbar on 2008-07-21
  2. CodeCrypter 1 Year On
    by tibbar on 2006-12-26
  3. Hooking drivers
    by tibbar on 2006-12-22
  4. ReactOS
    by tibbar on 2006-07-15
  5. update
    by tibbar on 2006-06-18
  6. What comes next?
    by tibbar on 2006-04-11
  7. Kernel Mode Ircbot
    by tibbar on 2006-04-06
  8. codeCrypter next release plans
    by tibbar on 2006-03-31
  9. jotti scan
    by tibbar on 2006-03-23
  10. codeCrypter
    by tibbar on 2006-03-01