mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-12 00:50:13 +01:00
* fix(Thread_POSIX): sleep() poor performance #3703 * chore(vscode): add file associations * fix(TaskManager): waits for all threads in the ThreadPool #3704 * fix(Thread): call std::this_thread::sleep_for() to sleep #3703 * fix(PollSet): wakeup fd is never read #3708 * feat(Thread): Add Thread::set/getAffinity() #3709 * doc(Thread): Thread::trySleep() assertion #3710 * fix(PollSet): wakeup fd is never read (windows portion and some other optimizations) #3708 * feat(SocketReactor): improvements #3713 * chore(ThreadTest): add missing include * fix(PollSet): wakeup fd is never read #3708 * fix(Any): #3682 #3683 #3692 #3712 * fix(mingw): lowercase winsock2 and iphlpapi to allow cross compile #3711 * feat(Thread): Add Thread::set/getAffinity() #3709 * chore(SocketReactor): one-liners inlined, removed redundant try/catch in dospatch, remove unused onBusy() * feat(SocketReactor): add socket to ErrorNotification * fix(SocketReactor): pollTimeout assignment and ConnectorTest leak
118 lines
1.7 KiB
C++
118 lines
1.7 KiB
C++
//
|
|
// SocketNotification.cpp
|
|
//
|
|
// Library: Net
|
|
// Package: Reactor
|
|
// Module: SocketNotification
|
|
//
|
|
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#include "Poco/Net/SocketNotification.h"
|
|
|
|
|
|
namespace Poco {
|
|
namespace Net {
|
|
|
|
|
|
SocketNotification::SocketNotification(SocketReactor* pReactor):
|
|
_pReactor(pReactor)
|
|
{
|
|
}
|
|
|
|
|
|
SocketNotification::~SocketNotification()
|
|
{
|
|
}
|
|
|
|
|
|
void SocketNotification::setSocket(const Socket& socket)
|
|
{
|
|
_socket = socket;
|
|
}
|
|
|
|
|
|
ReadableNotification::ReadableNotification(SocketReactor* pReactor):
|
|
SocketNotification(pReactor)
|
|
{
|
|
}
|
|
|
|
|
|
ReadableNotification::~ReadableNotification()
|
|
{
|
|
}
|
|
|
|
|
|
WritableNotification::WritableNotification(SocketReactor* pReactor):
|
|
SocketNotification(pReactor)
|
|
{
|
|
}
|
|
|
|
|
|
WritableNotification::~WritableNotification()
|
|
{
|
|
}
|
|
|
|
|
|
ErrorNotification::ErrorNotification(SocketReactor* pReactor, int code, const std::string& description):
|
|
SocketNotification(pReactor),
|
|
_code(code),
|
|
_description(description)
|
|
{
|
|
}
|
|
|
|
|
|
ErrorNotification::ErrorNotification(SocketReactor* pReactor, const Socket& socket,
|
|
int code, const std::string& description):
|
|
SocketNotification(pReactor),
|
|
_code(code),
|
|
_description(description)
|
|
{
|
|
setSocket(socket);
|
|
}
|
|
|
|
|
|
ErrorNotification::~ErrorNotification()
|
|
{
|
|
}
|
|
|
|
|
|
TimeoutNotification::TimeoutNotification(SocketReactor* pReactor):
|
|
SocketNotification(pReactor)
|
|
{
|
|
}
|
|
|
|
|
|
TimeoutNotification::~TimeoutNotification()
|
|
{
|
|
}
|
|
|
|
|
|
IdleNotification::IdleNotification(SocketReactor* pReactor):
|
|
SocketNotification(pReactor)
|
|
{
|
|
}
|
|
|
|
|
|
IdleNotification::~IdleNotification()
|
|
{
|
|
}
|
|
|
|
|
|
ShutdownNotification::ShutdownNotification(SocketReactor* pReactor):
|
|
SocketNotification(pReactor)
|
|
{
|
|
}
|
|
|
|
|
|
ShutdownNotification::~ShutdownNotification()
|
|
{
|
|
}
|
|
|
|
|
|
} } // namespace Poco::Net
|