forest-net
an overlay networks for large-scale virtual worlds
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Host.h
Go to the documentation of this file.
1
9
#ifndef HOST_H
10
#define HOST_H
11
12
#include "
Forest.h
"
13
#include "
Packet.h
"
14
#include "PacketStore.h"
15
16
namespace
forest {
17
18
26
class
Host
{
27
public
:
28
Host
(ipa_t, ipa_t);
29
~
Host
();
30
31
bool
init
();
32
void
run(
bool
,uint32_t,uint32_t);
33
bool
readPacket(
int
,
int
&,
int
&);
34
void
send(
int
);
35
int
receive();
36
private
:
37
int
nPkts;
// max number of packets in script
38
ipa_t myIpAdr;
// IP address of interface
39
uint16_t myPort;
// port number for all io
40
ipa_t rtrIpAdr;
// IP address of router
41
fAdr_t
myAdr;
// forest address of host
42
int
sock;
// socket number
43
44
PacketStore
*ps;
// pointer to packet store
45
};
46
47
48
}
// ends namespace
49
50
#endif
forest-net
cpp
include
Host.h
Generated on Mon Aug 4 2014 11:13:35 for forest-net by
1.8.4