Skip to content

Commit

Permalink
wutsocket: allow sending multicasts
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts authored and fincs committed Oct 17, 2023
1 parent 0dc1d00 commit 922eb45
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cafe/nsysnet.def
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ inet_ntoa
inet_ntoa_r
ntohl
ntohs
set_multicast_state
socket_lib_finish
socket_lib_init

Expand Down Expand Up @@ -162,7 +163,6 @@ send
sendto
sendto_multi
sendto_multi_ex
set_multicast_state
set_resolver_allocator
setsocklibopt
setsockopt
Expand Down
20 changes: 20 additions & 0 deletions include/nsysnet/misc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once
#include <wut.h>

/**
* \defgroup nsysnet_misc
* \ingroup nsysnet
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif

int
set_multicast_state(BOOL multicastEnable);

#ifdef __cplusplus
}
#endif

/** @} */
2 changes: 2 additions & 0 deletions libraries/wutsocket/wut_socket_common.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "wut_socket.h"
#include <nsysnet/misc.h>

#define NSYSNET_UNKNOWN_ERROR_OFFSET 10000

Expand Down Expand Up @@ -88,6 +89,7 @@ void __attribute__((weak))
__init_wut_socket()
{
socket_lib_init();
set_multicast_state(TRUE);
__wut_socket_init_devoptab();
ACInitialize();
ACConnectAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
#include <nsysccr/irda.h>
#include <nsyshid/hid.h>
#include <nsysnet/_socket.h>
#include <nsysnet/misc.h>
#include <nsysnet/netconfig.h>
#include <nsysnet/nssl.h>
#include <nsysuhs/uhs.h>
Expand Down

0 comments on commit 922eb45

Please sign in to comment.