Skip to content

Commit 0353031

Browse files
committed
GH71: WebSocket and broken Timeouts
fixed GH# 71: WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS)
1 parent 6d61386 commit 0353031

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Release 1.5.2 (2013-03-??)
1313
- merged GH #86: Invalid pointers to vector internals (by Adrian Imboden)
1414
- automatic library initialization macros
1515
- fixed GH #110: WebSocket accept() fails when Connection header contains multiple tokens
16+
- fixed GH# 71: WebSocket and broken Timeouts (POCO_BROKEN_TIMEOUTS)
1617

1718
Release 1.5.1 (2013-01-11)
1819
==========================

Net/include/Poco/Net/WebSocketImpl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ class Net_API WebSocketImpl: public StreamSocketImpl
7878
virtual int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0);
7979
virtual void sendUrgent(unsigned char data);
8080
virtual bool secure() const;
81+
virtual void setSendTimeout(const Poco::Timespan& timeout);
82+
virtual Poco::Timespan getSendTimeout();
83+
virtual void setReceiveTimeout(const Poco::Timespan& timeout);
84+
virtual Poco::Timespan getReceiveTimeout();
8185

8286
// Internal
8387
int frameFlags() const;

Net/src/WebSocketImpl.cpp

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,5 +297,29 @@ bool WebSocketImpl::secure() const
297297
return _pStreamSocketImpl->secure();
298298
}
299299

300-
300+
301+
void WebSocketImpl::setSendTimeout(const Poco::Timespan& timeout)
302+
{
303+
_pStreamSocketImpl->setSendTimeout(timeout);
304+
}
305+
306+
307+
Poco::Timespan WebSocketImpl::getSendTimeout()
308+
{
309+
return _pStreamSocketImpl->getSendTimeout();
310+
}
311+
312+
313+
void WebSocketImpl::setReceiveTimeout(const Poco::Timespan& timeout)
314+
{
315+
_pStreamSocketImpl->setReceiveTimeout(timeout);
316+
}
317+
318+
319+
Poco::Timespan WebSocketImpl::getReceiveTimeout()
320+
{
321+
return _pStreamSocketImpl->getReceiveTimeout();
322+
}
323+
324+
301325
} } // namespace Poco::Net

0 commit comments

Comments
 (0)