//#include //#include //#include // //#include //#include //#include "connectionParam.h" //#include "Sockets/Utility.h" #include "syncSocketHandler.h" #include "syncListenSocket.h" #include "syncSocket.h" #include "connectionList.h" //#include "buffer.h" //#include "log.h" SyncSocketHandler::SyncSocketHandler(SyncQueue & queue) :SocketHandler(),queue_(queue) { } int SyncSocketHandler::Select(long sec,long usec) { if(!queue_.empty()) { std::string sendstr = queue_.pop(); for (socket_m::iterator it = m_sockets.begin(); it != m_sockets.end(); it++) { ::SOCKETS_NAMESPACE::Socket *p = (*it).second; TcpSocket *p3 = dynamic_cast(p); //SyncListenSocket *p4 = dynamic_cast *>(p); if (p3) p3->Send(sendstr); } } return SocketHandler::Select(sec,usec); }