This library is part of the HAMcast project. It provides an easy to use C++ API that uses the HAMcast middleware (see Architecture).
All classes and functions needed to write a HAMcast based application are in the namespace hamcast. Usually, all you need to know about are the classes hamcast::uri, hamcast::multicast_socket and hamcast::multicast_packet.
hamcast::util contains utility classes and helper functions that might be useful if you're implementing a technology module. IPC related classes and function reside in the namespace hamcast::ipc, but are usually uninteresting for application developers. The implementation details and the IPC protocol documentation is fundamental if you want to port libhamcast to another language and/or unsupported plattform.
Note that undocumented parts of the library aren't safe to use because they might be changed and/or removed even in minor updates or the library.
See the simple_receiver and simple_sender examples to become a first overview.
HAMcast uses a middleware to abstract from native network communication. Thus, HAMcast based application are independent from multicast technologies and the middleware chooses the best available transport protocol at runtime (no compile-time dependencies & Late Binding).
HAMcast uses Automake
on Unix platforms (Linux, Mac OS X, etc.). The usual way to build libhamcast is:
automake -i
./configure
make
make install [as root]
If you're getting the error "No CAS for this plattform"
, then you need to set your hardware architecture by hand using the configure
script:
uname -m
to see your hardware architecture; this should be one of i568
, i686
or x86_64
./configure CXXFLAGS="-march={YOUR_ARCH}"
where {YOUR_ARCH}
is your hardware architecture (note: GCC expects x86-64
instead of x86_64
)make