Bitcoin Core  22.99.0
P2P Digital Currency
Functions
sock_tests.cpp File Reference
#include <compat.h>
#include <test/util/setup_common.h>
#include <threadinterrupt.h>
#include <util/sock.h>
#include <util/system.h>
#include <boost/test/unit_test.hpp>
#include <cassert>
#include <thread>
Include dependency graph for sock_tests.cpp:

Go to the source code of this file.

Functions

static bool SocketIsClosed (const SOCKET &s)
 
static SOCKET CreateSocket ()
 
 BOOST_AUTO_TEST_CASE (constructor_and_destructor)
 
 BOOST_AUTO_TEST_CASE (move_constructor)
 
 BOOST_AUTO_TEST_CASE (move_assignment)
 
 BOOST_AUTO_TEST_CASE (release)
 
 BOOST_AUTO_TEST_CASE (reset)
 
static void CreateSocketPair (int s[2])
 
static void SendAndRecvMessage (const Sock &sender, const Sock &receiver)
 
 BOOST_AUTO_TEST_CASE (send_and_receive)
 
 BOOST_AUTO_TEST_CASE (wait)
 
 BOOST_AUTO_TEST_CASE (recv_until_terminator_limit)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/8]

BOOST_AUTO_TEST_CASE ( constructor_and_destructor  )

Definition at line 37 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/8]

BOOST_AUTO_TEST_CASE ( move_assignment  )

Definition at line 59 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/8]

BOOST_AUTO_TEST_CASE ( move_constructor  )

Definition at line 47 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [4/8]

BOOST_AUTO_TEST_CASE ( recv_until_terminator_limit  )

Definition at line 149 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/8]

BOOST_AUTO_TEST_CASE ( release  )

Definition at line 72 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/8]

BOOST_AUTO_TEST_CASE ( reset  )

Definition at line 82 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/8]

BOOST_AUTO_TEST_CASE ( send_and_receive  )

Definition at line 108 of file sock_tests.cpp.

Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [8/8]

BOOST_AUTO_TEST_CASE ( wait  )

Definition at line 134 of file sock_tests.cpp.

Here is the call graph for this function:

◆ CreateSocket()

static SOCKET CreateSocket ( )
static

Definition at line 30 of file sock_tests.cpp.

Here is the caller graph for this function:

◆ CreateSocketPair()

static void CreateSocketPair ( int  s[2])
static

Definition at line 92 of file sock_tests.cpp.

Here is the caller graph for this function:

◆ SendAndRecvMessage()

static void SendAndRecvMessage ( const Sock sender,
const Sock receiver 
)
static

Definition at line 97 of file sock_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SocketIsClosed()

static bool SocketIsClosed ( const SOCKET s)
static

Definition at line 20 of file sock_tests.cpp.

Here is the caller graph for this function: