-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathDatagramSocketTest.h
63 lines (48 loc) · 1.45 KB
/
DatagramSocketTest.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// DatagramSocketTest.h
//
// Definition of the DatagramSocketTest class.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef DatagramSocketTest_INCLUDED
#define DatagramSocketTest_INCLUDED
#include "Poco/Net/Net.h"
#include "Poco/Net/SocketAddress.h"
#include "CppUnit/TestCase.h"
class DatagramSocketTest: public CppUnit::TestCase
{
public:
DatagramSocketTest(const std::string& name);
~DatagramSocketTest();
void testEcho();
void testMoveDatagramSocket();
void testEchoBuffer();
void testReceiveFromAvailable();
void testSendToReceiveFrom();
void testUnbound();
void testReuseAddressPortWildcard();
void testReuseAddressPortSpecific();
void testBroadcast();
void testGatherScatterFixed();
void testGatherScatterVariable();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
static Poco::UInt16 getFreePort(Poco::Net::SocketAddress::Family family, std::uint16_t port);
// "STRF" are sendto/recvfrom versions of the same functionality
void testGatherScatterFixedWin();
void testGatherScatterSTRFFixedWin();
void testGatherScatterVariableWin();
void testGatherScatterSTRFVariableWin();
void testGatherScatterFixedUNIX();
void testGatherScatterSTRFFixedUNIX();
void testGatherScatterVariableUNIX();
void testGatherScatterSTRFVariableUNIX();
void testLocalUDPConnectionResetWin();
};
#endif // DatagramSocketTest_INCLUDED