Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web


                  Visitors : 201 since Aug 04, 2002
        [ Last Modification : 2004/07/14]
        ---------------------------------
  Here is C++ stream-compatible TCP/IP sockets (Demo application).
  The program implements a demo application 
    which demonstrates using C++ stream-compatible sockets 
    developed by Maciej Sobczak http://www.msobczak.com/
  The Demo2 application has been written by Alex Vinokur.
  Programming Language : C++.
  Any and all comments would be appreciated.

        Alex Vinokur
        -----------------------------------
        alexvn@go.to
        alexv@hitechclub.com
        http://up.to/alexvn
        
        -----------------------------------

  Content.
  1. Algorithm
  2. Program Files
  3. Compiling
  4. Running (Log Files)
  5. Download

====================================================
=================== 1. Algorithm ===================
                               
    Demo2 Application Protocol (in general outline)
    - - - - - - - - - - - - - - - - - - - - - - - - 
    Client's request is a packet which contains :
    * request-id,
    * data type (typeid(T).name()),
    * data size (number of items),
    * data which is a vector of items;
      size of vector == number of items
    The packet may contain data of any type, for instance,
    vector, vector, vector.
    To create the request the client analyses the reply
    (on its previous request) received from the server.
  
    Server's reply consists of several packets of
    different types (subreplies).
    To create the reply the server analyses the request
    received from the client.

====================================================

==========================================================================
============================= 2. Program Files ===========================
The algorithm contains the following files :
  1. macro.h
  2. common.h
  3. trace.h
  4. sockets.h
  5. sockets2.h
  6. packet.h
  7. packet2.h
  8. partner.h
  9. partner2.h
  10. server.h
  11. client.h
  12. demotype.h
  13. demoapp.h
  14. demoapp2.h
  15. main.h
  16. common.cpp
  17. trace.cpp
  18. sockets.cpp
  19. packet.cpp
  20. partner.cpp
  21. server.cpp
  22. client.cpp
  23. demotype.cpp
  24. demoapp.cpp
  25. help.cpp
  26. main.cpp
Note. Lore's Source Converter was used to convert source code to HTML ====================================================

====================================================
==================== 3. Compiling ==================
//#########################################################
//------------------- System & Compiler  ------------------
Windows 2000 Professional
CYGWIN_NT-5.0 1.3.22(0.78/3/2)
GNU gcc/g++ version 3.2 20020927 (prerelease)
GNU Make version 3.79.1

//-------------------- Compiling : BEGIN ------------------
% make
//-------------------- Compiling : END --------------------

====================================================
===================== 4. Running ===================
//#########################################################
//-------------------- Running : BEGIN --------------------
//------ Getting Help ------
% sock

//------ Invoking server ------
% sock -s 2

//------ Invoking client ------
% sock -c 2


Sample Log Files

//-------------------- Running : END ----------------------

====================================================
===================== 5. Download ==================
//#########################################################

http://sourceforge.net/projects/cpp-sockets
http://alexvn.freeservers.com/s1/zip_dir//sock.zip