#include <stdio.h>
#include <conio.h>
#include <vector>
#include "Receiver.h"
#include "Sender.h"
#include "..\common\MessageGeneric.h"
#include "..\common\RNPacket.h"
#include "..\common\RNSocket.h"
Funktionen | |
int | main (int argc, char *argv[]) |
Variablen | |
const int | g_iPort = 9050 |
globale Konstante für den Port. Mehr... |
Autor: Christian Roesch
Erstelldatum: 27.03.2002 letzte Aenderung: 04.04.2002
Die Hauptdatei zu Rechnernetze - Aufgabe 1
|
Der Einsprungpunkt des Programms
00052 { 00053 //Sockets initialisieren 00054 if (!RNSocket::init(1,1)) 00055 { 00056 printf("Winsock could not be initialised!\n"); 00057 return 1; 00058 } 00059 00060 char pcEingabe[128]; 00061 00062 printf("(S)end or (R)eceive >"); 00063 00064 gets(pcEingabe); 00065 00066 if (pcEingabe[0]=='S' || pcEingabe[0]=='s') 00067 { 00068 Sender sndObj(g_iPort); 00069 sndObj.run(); 00070 } 00071 00072 if (pcEingabe[0]=='R' || pcEingabe[0]=='r') 00073 { 00074 Receiver rcvObj(g_iPort); 00075 rcvObj.run(); 00076 } 00077 00078 //Sockets aufräumen 00079 if (!RNSocket::cleanUp()) 00080 { 00081 return 1; 00082 } 00083 00084 getch(); 00085 00086 return 0; 00087 } |
|
globale Konstante für den Port.
|