| 1 | // |
|---|---|
| 2 | // SocketTest.h |
| 3 | // |
| 4 | // Definition of the SocketTest class. |
| 5 | // |
| 6 | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. |
| 7 | // and Contributors. |
| 8 | // |
| 9 | // SPDX-License-Identifier: BSL-1.0 |
| 10 | // |
| 11 | |
| 12 | |
| 13 | #ifndef SocketTest_INCLUDED |
| 14 | #define SocketTest_INCLUDED |
| 15 | |
| 16 | |
| 17 | #include "Poco/Net/Net.h" |
| 18 | #include "Poco/CppUnit/TestCase.h" |
| 19 | |
| 20 | |
| 21 | class SocketTest: public CppUnit::TestCase |
| 22 | { |
| 23 | public: |
| 24 | SocketTest(const std::string& name); |
| 25 | ~SocketTest(); |
| 26 | |
| 27 | void testEcho(); |
| 28 | void testPoll(); |
| 29 | void testAvailable(); |
| 30 | void testFIFOBuffer(); |
| 31 | void testConnect(); |
| 32 | void testConnectRefused(); |
| 33 | void testConnectRefusedNB(); |
| 34 | void testNonBlocking(); |
| 35 | void testAddress(); |
| 36 | void testAssign(); |
| 37 | void testTimeout(); |
| 38 | void testBufferSize(); |
| 39 | void testOptions(); |
| 40 | void testSelect(); |
| 41 | void testSelect2(); |
| 42 | void testSelect3(); |
| 43 | void testEchoUnixLocal(); |
| 44 | void testEchoLinuxAbstract(); |
| 45 | |
| 46 | void setUp(); |
| 47 | void tearDown(); |
| 48 | |
| 49 | static CppUnit::Test* suite(); |
| 50 | |
| 51 | private: |
| 52 | void onReadable(bool& b); |
| 53 | void onWritable(bool& b); |
| 54 | |
| 55 | int _readableToNot; |
| 56 | int _notToReadable; |
| 57 | int _writableToNot; |
| 58 | int _notToWritable; |
| 59 | }; |
| 60 | |
| 61 | |
| 62 | #endif // SocketTest_INCLUDED |
| 63 |