GH71: WebSocket and broken Timeouts

fixed GH# 71: WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS)
This commit is contained in:
aleks-f
2013-02-26 22:39:17 -06:00
parent 6d613869cc
commit 03530311b8
3 changed files with 30 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ Release 1.5.2 (2013-03-??)
- merged GH #86: Invalid pointers to vector internals (by Adrian Imboden) - merged GH #86: Invalid pointers to vector internals (by Adrian Imboden)
- automatic library initialization macros - automatic library initialization macros
- fixed GH #110: WebSocket accept() fails when Connection header contains multiple tokens - fixed GH #110: WebSocket accept() fails when Connection header contains multiple tokens
- fixed GH# 71: WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS)
Release 1.5.1 (2013-01-11) Release 1.5.1 (2013-01-11)
========================== ==========================

View File

@@ -78,6 +78,10 @@ public:
virtual int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0); virtual int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0);
virtual void sendUrgent(unsigned char data); virtual void sendUrgent(unsigned char data);
virtual bool secure() const; virtual bool secure() const;
virtual void setSendTimeout(const Poco::Timespan& timeout);
virtual Poco::Timespan getSendTimeout();
virtual void setReceiveTimeout(const Poco::Timespan& timeout);
virtual Poco::Timespan getReceiveTimeout();
// Internal // Internal
int frameFlags() const; int frameFlags() const;

View File

@@ -297,5 +297,29 @@ bool WebSocketImpl::secure() const
return _pStreamSocketImpl->secure(); return _pStreamSocketImpl->secure();
} }
void WebSocketImpl::setSendTimeout(const Poco::Timespan& timeout)
{
_pStreamSocketImpl->setSendTimeout(timeout);
}
Poco::Timespan WebSocketImpl::getSendTimeout()
{
return _pStreamSocketImpl->getSendTimeout();
}
void WebSocketImpl::setReceiveTimeout(const Poco::Timespan& timeout)
{
_pStreamSocketImpl->setReceiveTimeout(timeout);
}
Poco::Timespan WebSocketImpl::getReceiveTimeout()
{
return _pStreamSocketImpl->getReceiveTimeout();
}
} } // namespace Poco::Net } } // namespace Poco::Net