mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
spaces -> tabs
This commit is contained in:
@@ -141,7 +141,7 @@ public:
|
|||||||
void logout();
|
void logout();
|
||||||
|
|
||||||
void close();
|
void close();
|
||||||
/// Sends a QUIT command and closes the connection to the server.
|
/// Sends a QUIT command and closes the connection to the server.
|
||||||
///
|
///
|
||||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||||
/// NetException in case of a general network communication failure.
|
/// NetException in case of a general network communication failure.
|
||||||
|
@@ -179,14 +179,14 @@ public:
|
|||||||
/// For dealing with IPv4 compatible addresses in a mixed environment,
|
/// For dealing with IPv4 compatible addresses in a mixed environment,
|
||||||
/// a special syntax is available: x:x:x:x:x:x:d.d.d.d, where the 'x's are the
|
/// a special syntax is available: x:x:x:x:x:x:d.d.d.d, where the 'x's are the
|
||||||
/// hexadecimal values of the six high-order 16-bit pieces of the address,
|
/// hexadecimal values of the six high-order 16-bit pieces of the address,
|
||||||
/// and the 'd's are the decimal values of the four low-order 8-bit pieces of the
|
/// and the 'd's are the decimal values of the four low-order 8-bit pieces of the
|
||||||
/// standard IPv4 representation address. Example: ::FFFF:192.168.1.120
|
/// standard IPv4 representation address. Example: ::FFFF:192.168.1.120
|
||||||
///
|
///
|
||||||
/// If an IPv6 address contains a non-zero scope identifier, it is added
|
/// If an IPv6 address contains a non-zero scope identifier, it is added
|
||||||
/// to the string, delimited by a percent character. On Windows platforms,
|
/// to the string, delimited by a percent character. On Windows platforms,
|
||||||
/// the numeric value (which specifies an interface index) is directly
|
/// the numeric value (which specifies an interface index) is directly
|
||||||
/// appended. On Unix platforms, the name of the interface corresponding
|
/// appended. On Unix platforms, the name of the interface corresponding
|
||||||
/// to the index (interpretation of the scope identifier) is added.
|
/// to the index (interpretation of the scope identifier) is added.
|
||||||
|
|
||||||
bool isWildcard() const;
|
bool isWildcard() const;
|
||||||
/// Returns true iff the address is a wildcard (all zero)
|
/// Returns true iff the address is a wildcard (all zero)
|
||||||
|
@@ -84,7 +84,7 @@ HostEntry DNS::hostByName(const std::string& hostname)
|
|||||||
return HostEntry(he);
|
return HostEntry(he);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
error(lastError(), hostname); // will throw an appropriate exception
|
error(lastError(), hostname); // will throw an appropriate exception
|
||||||
throw NetException(); // to silence compiler
|
throw NetException(); // to silence compiler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -133,9 +133,9 @@ HostEntry& HostEntry::operator = (const HostEntry& entry)
|
|||||||
{
|
{
|
||||||
if (&entry != this)
|
if (&entry != this)
|
||||||
{
|
{
|
||||||
_name = entry._name;
|
_name = entry._name;
|
||||||
_aliases = entry._aliases;
|
_aliases = entry._aliases;
|
||||||
_addresses = entry._addresses;
|
_addresses = entry._addresses;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@@ -466,13 +466,13 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
|
|||||||
while (rc < 0 && lastError() == POCO_EINTR);
|
while (rc < 0 && lastError() == POCO_EINTR);
|
||||||
|
|
||||||
::close(epollfd);
|
::close(epollfd);
|
||||||
if (rc < 0) error();
|
if (rc < 0) error();
|
||||||
return rc > 0;
|
return rc > 0;
|
||||||
|
|
||||||
#elif defined(POCO_HAVE_FD_POLL)
|
#elif defined(POCO_HAVE_FD_POLL)
|
||||||
|
|
||||||
pollfd pollBuf;
|
pollfd pollBuf;
|
||||||
|
|
||||||
memset(&pollBuf, 0, sizeof(pollfd));
|
memset(&pollBuf, 0, sizeof(pollfd));
|
||||||
pollBuf.fd = _sockfd;
|
pollBuf.fd = _sockfd;
|
||||||
if (mode & SELECT_READ) pollBuf.events |= POLLIN;
|
if (mode & SELECT_READ) pollBuf.events |= POLLIN;
|
||||||
|
@@ -219,7 +219,7 @@ void HTTPResponseTest::testCookies()
|
|||||||
response2.getCookies(cookies);
|
response2.getCookies(cookies);
|
||||||
assert (cookies.size() == 2);
|
assert (cookies.size() == 2);
|
||||||
assert (cookies[0].getName() == "name1" && cookies[1].getName() == "name2"
|
assert (cookies[0].getName() == "name1" && cookies[1].getName() == "name2"
|
||||||
|| cookies[0].getName() == "name2" && cookies[1].getName() == "name1");
|
|| cookies[0].getName() == "name2" && cookies[1].getName() == "name1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -124,8 +124,8 @@ void HTTPTestServer::run()
|
|||||||
bool HTTPTestServer::requestComplete() const
|
bool HTTPTestServer::requestComplete() const
|
||||||
{
|
{
|
||||||
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
|
return ((_lastRequest.substr(0, 3) == "GET" || _lastRequest.substr(0, 4) == "HEAD") &&
|
||||||
(_lastRequest.find("\r\n\r\n") != std::string::npos)) ||
|
(_lastRequest.find("\r\n\r\n") != std::string::npos)) ||
|
||||||
(_lastRequest.find("\r\n0\r\n") != std::string::npos);
|
(_lastRequest.find("\r\n0\r\n") != std::string::npos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -140,15 +140,15 @@ void SocketAddressTest::testSocketAddress()
|
|||||||
|
|
||||||
void SocketAddressTest::testSocketRelationals()
|
void SocketAddressTest::testSocketRelationals()
|
||||||
{
|
{
|
||||||
SocketAddress sa1("192.168.1.100", 100);
|
SocketAddress sa1("192.168.1.100", 100);
|
||||||
SocketAddress sa2("192.168.1.100:100");
|
SocketAddress sa2("192.168.1.100:100");
|
||||||
assert (sa1 == sa2);
|
assert (sa1 == sa2);
|
||||||
|
|
||||||
SocketAddress sa3("192.168.1.101", "99");
|
SocketAddress sa3("192.168.1.101", "99");
|
||||||
assert (sa2 < sa3);
|
assert (sa2 < sa3);
|
||||||
|
|
||||||
SocketAddress sa4("192.168.1.100", "102");
|
SocketAddress sa4("192.168.1.100", "102");
|
||||||
assert (sa3 < sa4);
|
assert (sa3 < sa4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user