diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-06-18 18:53:27 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2005-06-18 18:53:27 +0000 |
commit | 152c0f5c127eac99b5c9097aa4db2b34e14e6dd0 (patch) | |
tree | 0d399a92623e98588cd34e4fe0c2cf7fed880173 /protocols/ace/RMCast/Fragment.cpp | |
parent | 7e7f4a5d3e77a42e648b7dd2e1b9cf23a3780955 (diff) | |
download | ATCD-MyACE.tar.gz |
This commit was manufactured by cvs2svn to create branch 'MyACE'.MyACE
Diffstat (limited to 'protocols/ace/RMCast/Fragment.cpp')
-rw-r--r-- | protocols/ace/RMCast/Fragment.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/protocols/ace/RMCast/Fragment.cpp b/protocols/ace/RMCast/Fragment.cpp deleted file mode 100644 index 6a0c203a133..00000000000 --- a/protocols/ace/RMCast/Fragment.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// file : ace/RMCast/Fragment.cpp -// author : Boris Kolpackov <boris@kolpackov.net> -// cvs-id : $Id$ - -#include "Fragment.h" - -/* -#include <iostream> -using std::cerr; -using std::endl; -*/ - -namespace ACE_RMCast -{ - Fragment:: - Fragment () - { - } - - void Fragment:: - send (Message_ptr m) - { - if (Data const* data = static_cast<Data const*> (m->find (Data::id))) - { - if (data->size () <= max_payload_size) - { - out_->send (m); - return; - } - - char const* p (data->buf ()); - size_t size (data->size ()); - - // Need fragmentation. - // - u32 packets (size / max_payload_size + (size % max_payload_size ? 1 : 0)); - - // cerr << "size : " << size << endl - // << "packs: " << packets << endl; - - - for (u32 i (1); i <= packets; ++i) - { - Message_ptr part (new Message); - - size_t s (i == packets ? size % max_payload_size : max_payload_size); - - // cerr << "pack: " << s << endl; - - part->add (Profile_ptr (new Part (i, packets, size))); - part->add (Profile_ptr (new Data (p, s))); - - out_->send (part); - - p += s; - } - } - } -} |