From fffd213c8cba2135afda493d797c41c10354770e Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Sat, 12 Apr 2008 11:38:42 +0000 Subject: big svn cleanup --- src/syncSocketHandler.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/syncSocketHandler.cpp (limited to 'src/syncSocketHandler.cpp') diff --git a/src/syncSocketHandler.cpp b/src/syncSocketHandler.cpp new file mode 100644 index 0000000..25f4c43 --- /dev/null +++ b/src/syncSocketHandler.cpp @@ -0,0 +1,38 @@ +//#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); +} -- cgit v1.2.3