#include "globus_common.h" #include "globus_net_manager.h"
globus_net_manager_logging.c Network Manager Definition
For the examples provided in this library, the globus_net_manager_s is registered during module activation in a globus_extension module. This method makes it easy to use network managers in a shared library environment. This is also a good place to initialize any state that you need to retain between calls to the network manager.
To implement this, do the following: globus_net_manager_logging.c Module Descriptor and Activation
Finally, the real work of the manager is done in the functions registered in the globus_net_manager_s. For brevity, I'll just include the pre_listen function in this tutorial. This function is passed the task-id associated with the operation, the transport ("tcp", "udp", "udt", etc) used by the network, and whatever attributes are associated with the operation. If we wanted to modify things before they were processed by the network, we could create a modified copy of the attributes in the pre_listen function and return them via the attr_array_out parameter. In this case, we simply print out the information we've received from the network stack.
globus_net_manager_logging.c Pre-Listen Implementation