/*
- * Copyright (c) 1998-2001, Index Data.
+ * Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-pdu-assoc-thread.cpp,v 1.7 2004-11-30 21:10:31 adam Exp $
+ * $Id: yaz-pdu-assoc-thread.cpp,v 1.11 2005-06-08 13:28:06 adam Exp $
*/
#ifdef WIN32
#if USE_THREADS
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#ifdef WIN32
#include <process.h>
#else
#include <pthread.h>
-#include <unistd.h>
#endif
+
#include <errno.h>
-#include <yaz/ylog.h>
+#include <yaz/log.h>
#include <yaz/tcpip.h>
#include <yaz++/pdu-assoc.h>
#include <yaz++/socket-manager.h>
-Yaz_PDU_AssocThread::Yaz_PDU_AssocThread(
- IYazSocketObservable *socketObservable)
- : Yaz_PDU_Assoc(socketObservable)
+using namespace yazpp_1;
+
+PDU_AssocThread::PDU_AssocThread(
+ ISocketObservable *socketObservable)
+ : PDU_Assoc(socketObservable)
{
}
#endif
events(void *p)
{
- Yaz_SocketManager *s = (Yaz_SocketManager *) p;
+ SocketManager *s = (SocketManager *) p;
yaz_log (YLOG_LOG, "thread started");
while (s->processEvent() > 0)
#endif
}
-void Yaz_PDU_AssocThread::childNotify(COMSTACK cs)
+void PDU_AssocThread::childNotify(COMSTACK cs)
{
- Yaz_SocketManager *socket_observable = new Yaz_SocketManager;
- Yaz_PDU_Assoc *new_observable = new Yaz_PDU_Assoc (socket_observable, cs);
+ SocketManager *socket_observable = new SocketManager;
+ PDU_Assoc *new_observable = new PDU_Assoc (socket_observable, cs);
new_observable->m_next = m_children;
m_children = new_observable;