Main.cpp
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:3k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- #include "Server.h"
- #include "stdio.h"
- void Welcome( void )
- {
- printf( " =================================================n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( "| 欢迎使用赛力视频会议中央管理服务器系统V1.0 |n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( "| 要退出系统,请输入 exit |n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( "| 切勿通过直接关闭窗口来退出本系统 |n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( "| 2004年06月04日 |n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( " =================================================nn" );
- }
- void PrintMsg( void )
- {
- printf( " ==========================================n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( "| 输入无效命令,要退出系统,请输入exit |n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( " ==========================================nn" );
- }
- void GoodBye( void )
- {
- printf( " ==========================================n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( "| 服务器已经退出 |n" );
- printf( "| |n" );
- printf( "| |n" );
- printf( " ==========================================nn" );
- }
- void main( void )
- {
- CServer server;
- Welcome( );
- if( server.Run( 8000 ) )
- {
- for( ;; )
- {
- char cmd[20];
- gets( cmd );
- for( int i = 0 ; cmd [ i ] ; i ++ )
- if( ::isupper( cmd[ i ] ) )
- cmd[ i ] = ::tolower( cmd[ i ] );
- if( ! strcmp( cmd , "exit" ) )
- break;
- PrintMsg( );
- }
- }
- server.Stop( );
- GoodBye( );
- }