00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 class TSrvIfaceMgr;
00022 #ifndef RELIFACEMGR_H
00023 #define RELIFACEMGR_H
00024
00025 #include "RelCommon.h"
00026 #include "RelMsg.h"
00027 #include "IfaceMgr.h"
00028 #include "Iface.h"
00029
00030 class TRelIfaceMgr: public TIfaceMgr {
00031 public:
00032 TRelIfaceMgr(string xmlFile);
00033 ~TRelIfaceMgr();
00034 friend ostream & operator <<(ostream & strum, TRelIfaceMgr &x);
00035
00036 SmartPtr<TRelMsg> decodeRelayRepl(SmartPtr<TIfaceIface> iface,
00037 SmartPtr<TIPv6Addr> peer,
00038 char * buf, int bufsize);
00039 SmartPtr<TRelMsg> decodeMsg(SmartPtr<TIfaceIface> iface,
00040 SmartPtr<TIPv6Addr> peer,
00041 char * buf, int bufsize);
00042
00043 void dump();
00044
00045
00046 bool send(int iface, char *data, int dataLen, SmartPtr<TIPv6Addr> addr, int port);
00047
00048
00049 SmartPtr<TRelMsg> select(unsigned long timeout);
00050
00051 private:
00052 TCtx * Ctx;
00053 };
00054
00055 #endif
00056