Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
TSCOPE.C
Package: ertos.rar [view]
Upload User: sunrenlu
Upload Date: 2022-06-13
Package Size: 1419k
Code Size: 2k
Category:
OS Develop
Development Platform:
DOS
- /*
- * tscope - thermometer scopt demonstrates a simple web page with real-time graphs
- */
- #include <dos.h>
- #include <stdio.h>
- #include <rtos.h>
- #include <sio.h>
- #include <string.h>
- #include <mem.h>
- #include <telnetd.h>
- #include <ftpd.h>
- #include <httpd.h>
- #include <smtpcli.h>
- #include <process.h>
- #include "webpart.h"
- #define EMAILNOTIFY "email.notify"
- static void (*old_init)(char *name, char *value);
- char emailuserid[255] = "";
- /********************************************************************/
- /* our_init - used to read TCP.CFG file
- */
- static void our_init( char *name, char *value )
- {
- int found = 0;
- if ( !stricmp( name, EMAILNOTIFY )) {
- strncpy( emailuserid, value, sizeof( emailuserid));
- emailuserid[ sizeof( emailuserid ) - 1 ] = 0;
- cprintf("Configured email userid to %srn", emailuserid );
- found = 1;
- }
- if ( !found )
- if ( old_init ) (*old_init)( name, value );
- }
- /********************************************************************/
- /* main - setup everything then wait for a keystroke
- */
- main()
- {
- int temp;
- DWORD dummy;
- rt_init( 100 );
- kdebug = 1 ;
- old_init = usr_init;
- usr_init = our_init;
- sock_init();
- cputs("TSCOPE 1.0rn");
- cputs("Copyright (c) 1990, 1999 Erick Engelkern");
- cputs("Press any key to exitrn");
- rt_newthread( ftpdthread, 1,4096, 0, "ftpd" );
- #define MAXHTTPD 5
- rt_newthread( collector, 1,4096, 0, "collector" );
- for ( temp = 0 ; temp < MAXHTTPD; ++temp )
- rt_newthread( httpdthread, (DWORD)&user_proc, 4096, 0, "httpd worker" );
- while ( 1 ) {
- if ( kbhit() ) break;
- rt_sleep( 250 );
- }
- }