"Fossies" - the Fresh Open Source Software Archive

Member "erltools/com/connect/tdispat.ch" (22 Feb 2000, 2309 Bytes) of package /linux/misc/old/erltools-4.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1  language ogsng;
    2 
    3 #ifdef BORLAND
    4 #include <process.h>
    5 #include <stdio.h>
    6 #include <conio.h>
    7 #endif
    8 
    9 #include "token.h"
   10 
   11 #define NB_SCEN 32
   12 
   13 void main ()
   14 {
   15     EString testName("dispatcher");
   16     int     dispatcherNumb = 0 ; // numb of dispatcher
   17     int     i = 0 ;
   18     
   19     for ( dispatcherNumb = 0 ; dispatcherNumb < NB_SCEN ; dispatcherNumb++ ) {
   20         EString nameSend ; // name connected 
   21         nameSend
   22             = testName + CompactItoa(1000 * (i + 1) + 10 * dispatcherNumb);
   23 #ifdef BORLAND
   24         CloseHandle(
   25             (HANDLE)spawnl(P_NOWAIT, "qtdispatcher.exe", "qtdispatcher.exe"
   26                 , "-name", nameSend.c_str(), "-loop", "40", (char *)0)); // Sleep(1000);
   27 #else 
   28         EString comm = "tdispatcher -loop 100 -name ";
   29         comm += nameSend ;
   30         comm += " &";
   31         system(comm.c_str());
   32 #endif
   33     }
   34     return ;
   35     for ( i = 0 ; i < 100000 ; i++ ) {
   36         for ( dispatcherNumb = 0 ; dispatcherNumb < NB_SCEN ; 
   37                 dispatcherNumb++ ) {
   38             EString nameSend ; // name connected 
   39             nameSend
   40                 = testName
   41                     + CompactItoa(1000 * (i + 1) + 10 * dispatcherNumb);
   42 #ifdef BORLAND
   43             CloseHandle(
   44                 (HANDLE)spawnl(P_NOWAIT, "tdispatcher.exe"
   45                     , "tdispatcher.exe", "-name", nameSend.c_str(), "-loop"
   46                     , "40", (char *)0)); // Sleep(1000);
   47 #else 
   48             EString comm = "tdispatcher -loop 100 -name ";
   49             comm += nameSend ;
   50             comm += " &";
   51             system(comm.c_str());
   52 #endif
   53         }
   54         Sleep(10000);
   55         for ( dispatcherNumb = 0 ; dispatcherNumb < NB_SCEN ; 
   56                 dispatcherNumb++ ) {
   57             EString nameSend ; // name connected 
   58             nameSend
   59                 = testName + "bis"
   60                     + CompactItoa(1000 * (i + 1) + 10 * dispatcherNumb);
   61 #ifdef BORLAND
   62             CloseHandle(
   63                 (HANDLE)spawnl(P_NOWAIT, "tdispatcher.exe"
   64                     , "tdispatcher.exe", "-name", nameSend.c_str(), "-loop"
   65                     , "3", (char *)0)); // Sleep(1000);
   66 #else 
   67             EString comm = "tdispatcher -loop 100 -name ";
   68             comm += nameSend ;
   69             comm += " &";
   70             system(comm.c_str());
   71 #endif
   72         }
   73         Sleep(60000);
   74     }
   75 }