ListenerUDP Class Reference
[Internet protocol sockets]

server UDP that listens on a port waiting for messages More...

#include <socketUDP.h>

Inheritance diagram for ListenerUDP:

SocketUDP MIPObject

List of all members.

Public Member Functions

 ListenerUDP (const int port)
 non-wrapper constructor
 ListenerUDP (const int port, string &my_host)
 non-wrapper constructor
 ListenerUDP (const int bp, const int lp, string &net_addr)
 wrapper constructor
 ~ListenerUDP ()
 destructor
int receive (string &buffe, string &senderAddr)
 receive a string and gives the sender address (blocking function)
void receive (char *buf, string &senderAddr, int numbytes)
 receive numbytes char and gives the sender address (blocking function)
int receive (string &buffe)
 receive a string
int lSelect ()
 check if there are messages waiting to be received
string getObjectName () const
 Method that gives the name of the class as it will be displayed by the tracer.


Detailed Description

server UDP that listens on a port waiting for messages

Author:
Paolo Stegagno, Antonio Franchi

Constructor & Destructor Documentation

ListenerUDP::ListenerUDP ( const int  port  ) 

non-wrapper constructor

ListenerUDP::ListenerUDP ( const int  port,
string &  my_host 
)

non-wrapper constructor

ListenerUDP::ListenerUDP ( const int  bp,
const int  lp,
string &  net_addr 
)

wrapper constructor

ListenerUDP::~ListenerUDP (  ) 

destructor


Member Function Documentation

int ListenerUDP::receive ( string &  buffe,
string &  senderAddr 
)

receive a string and gives the sender address (blocking function)

void ListenerUDP::receive ( char *  buf,
string &  senderAddr,
int  numbytes 
)

receive numbytes char and gives the sender address (blocking function)

int ListenerUDP::receive ( string &  buffe  ) 

receive a string

int ListenerUDP::lSelect (  ) 

check if there are messages waiting to be received

string ListenerUDP::getObjectName (  )  const [inline, virtual]

Method that gives the name of the class as it will be displayed by the tracer.

Returns:
a string, which is the name of the current class
Note:
pure virtual, has to be redefined for each child class

Reimplemented from SocketUDP.


The documentation for this class was generated from the following files:

Generated on Mon Feb 20 07:01:09 2017 for MIP by  doxygen 1.5.6