Skip to end of metadata
Go to start of metadata

The AsyncSocketGroup and AsyncDatagramGroup class represents a grouping of a number of asynchronous sockets and datagrams respectively. In most applications a number of sockets or datagrams might have a relation of some kind. Consider, for example, an P2P application where we have a number of outgoing sockets and a number of incoming sockets. Many P2P applications are characterized with a high churn (the continuous process of node arrival and departure) and new connections must be established frequently. These applications might have a connection policy, for example, that no more (and no less) then 100 outgoing connections must be active at the same time. By grouping together all outgoing sockets in an AsyncDatagramGroup this policy can easily be enforced:

Both groups make it possible to set Event-handlers that are called whenever a specific event occurs. For example, an asynchronous socket might leave (disconnected) a group or join (successfully connected to a remote host) a group.

Labels
  • None