/*****************************************************************************
* 	Project 	: Network Based Message Queue System		    **
*	Course		: CIS 650 - Software Engineering		    **
*	Location 	: /research/paraducks3/courses/cis650/proj/rt	    **
*	File		: rtcomm.h					    **
*	Description 	: Communication Module. The class declaration	    **
*****************************************************************************/

#ifndef RTCOMM_H
#define RTCOMM_H

class CommunicationModule {
	public : 
	Connection	*parentConn; /* the parent socket connection id */
 	ListOfConnections *listOfSocketDescriptors;

	fd_set	readyToRead; /* set of ready to read connections */
	 /* list of all connections */

	CommunicationModule(void); /* constructor creates and binds connection */
	~CommunicationModule(void); /* releases all connections */
	int 	accept_new_connection(void); /* gets new clients connected */
	int	wait_for_messages(void); /* selects ready to read connections */
	int 	get_message(Connection *c, Message *m); 
		/* get message  from the connection */
	

}; 


#endif /* RTCOMM_H */



