Logo
~Sockets~
~Examples~
~Contact~


icm.cpp File Reference

#include <SocketHandler.h>
#include <StdoutLog.h>
#include "Stdin2.h"
#include "ICMPTwistSocket.h"

Include dependency graph for icm.cpp:

Go to the source code of this file.


Functions

int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

File ......... icm.cpp Published .... 2004-07-03 Author ....... grymse@alhem.net

Definition at line 30 of file icm.cpp.

References ICMPTwistSocket::Connect(), and Stdin2::SetIcmpSocket().

00031 {
00032         SocketHandler h;
00033         StdoutLog log;
00034         h.RegStdLog(&log);
00035         Stdin2 console(h);
00036         ICMPTwistSocket s(h);
00037 
00038         if (s.GetSocket() == INVALID_SOCKET)
00039         {
00040                 return -1;
00041         }
00042         s.Connect("127.0.0.1");
00043         h.Add(&s);
00044         console.SetIcmpSocket(&s);
00045         h.Add(&console);
00046         h.Select(1,0);
00047         while (h.GetCount())
00048         {
00049                 h.Select(1,0);
00050         }
00051         return 0;
00052 }

Page, code, and content Copyright (C) 2006 by Anders Hedström
Generated on Mon Aug 29 20:21:47 2005 for C++ Sockets by  doxygen 1.4.4