mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
changes from main repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Socket.h
|
||||
//
|
||||
// $Id: //poco/svn/Net/include/Poco/Net/Socket.h#2 $
|
||||
// $Id: //poco/svn/Net/include/Poco/Net/Socket.h#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
@@ -272,6 +272,11 @@ public:
|
||||
/// Sets the socket in blocking mode if flag is true,
|
||||
/// disables blocking mode if flag is false.
|
||||
|
||||
bool getBlocking() const;
|
||||
/// Returns the blocking mode of the socket.
|
||||
/// This method will only work if the blocking modes of
|
||||
/// the socket are changed via the setBlocking method!
|
||||
|
||||
SocketAddress address() const;
|
||||
/// Returns the IP address and port number of the socket.
|
||||
|
||||
@@ -543,6 +548,12 @@ inline void Socket::setBlocking(bool flag)
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getBlocking() const
|
||||
{
|
||||
return _pImpl->getBlocking();
|
||||
}
|
||||
|
||||
|
||||
inline SocketImpl* Socket::impl() const
|
||||
{
|
||||
return _pImpl;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// SocketImpl.h
|
||||
//
|
||||
// $Id: //poco/svn/Net/include/Poco/Net/SocketImpl.h#2 $
|
||||
// $Id: //poco/svn/Net/include/Poco/Net/SocketImpl.h#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
@@ -323,10 +323,15 @@ public:
|
||||
bool getBroadcast();
|
||||
/// Returns the value of the SO_BROADCAST socket option.
|
||||
|
||||
void setBlocking(bool flag);
|
||||
virtual void setBlocking(bool flag);
|
||||
/// Sets the socket in blocking mode if flag is true,
|
||||
/// disables blocking mode if flag is false.
|
||||
|
||||
virtual bool getBlocking() const;
|
||||
/// Returns the blocking mode of the socket.
|
||||
/// This method will only work if the blocking modes of
|
||||
/// the socket are changed via the setBlocking method!
|
||||
|
||||
int socketError();
|
||||
/// Returns the value of the SO_ERROR socket option.
|
||||
|
||||
@@ -409,6 +414,7 @@ private:
|
||||
Poco::Timespan _recvTimeout;
|
||||
Poco::Timespan _sndTimeout;
|
||||
#endif
|
||||
bool _blocking;
|
||||
|
||||
friend class Socket;
|
||||
friend class SecureSocketImpl;
|
||||
@@ -446,6 +452,12 @@ inline void SocketImpl::invalidate()
|
||||
}
|
||||
|
||||
|
||||
inline bool SocketImpl::getBlocking() const
|
||||
{
|
||||
return _blocking;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user