mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 20:59:45 +01:00
add timeout to testMulticast
This commit is contained in:
@@ -47,10 +47,11 @@ MulticastSocketTest::~MulticastSocketTest()
|
|||||||
|
|
||||||
void MulticastSocketTest::testMulticast()
|
void MulticastSocketTest::testMulticast()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MulticastEchoServer echoServer;
|
MulticastEchoServer echoServer;
|
||||||
MulticastSocket ms(SocketAddress::IPv4);
|
MulticastSocket ms(SocketAddress::IPv4);
|
||||||
|
ms.setReceiveTimeout(Poco::Timespan(5, 0));
|
||||||
int n = ms.sendTo("hello", 5, echoServer.group());
|
int n = ms.sendTo("hello", 5, echoServer.group());
|
||||||
assertTrue (n == 5);
|
assertTrue (n == 5);
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
|
|||||||
Reference in New Issue
Block a user