wireChunk

git-svn-id: svn://elaine/murooma/trunk@134 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-08-04 06:43:10 +00:00
parent 042000c8cc
commit b8cc8e8a67
7 changed files with 75 additions and 38 deletions

View file

@ -29,7 +29,7 @@ int main () {
publisher.bind("tcp://0.0.0.0:123458");
char c[2];
Chunk* chunk = new Chunk();
WireChunk* chunk = new WireChunk();
timeval tvChunk;
gettimeofday(&tvChunk, NULL);
long nextTick = getTickCount();
@ -50,9 +50,8 @@ int main () {
chunk->tv_sec = tvChunk.tv_sec;
chunk->tv_usec = tvChunk.tv_usec;
chunk->idx = 0;
zmq::message_t message(sizeof(Chunk));
memcpy(message.data(), chunk, sizeof(Chunk));
zmq::message_t message(sizeof(WireChunk));
memcpy(message.data(), chunk, sizeof(WireChunk));
publisher.send(message);
addMs(tvChunk, WIRE_CHUNK_MS);
@ -64,8 +63,8 @@ int main () {
}
else
{
cin.sync();
gettimeofday(&tvChunk, NULL);
cin.sync();
gettimeofday(&tvChunk, NULL);
nextTick = getTickCount();
}
}