Skip to content

Commit

Permalink
Restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Jun 14, 2023
1 parent 170d265 commit e040c1c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/lib/dnssd/minimal_mdns/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ class Server
chip::Inet::InterfaceId interfaceId = chip::Inet::InterfaceId::Null(),
chip::Inet::IPAddressType addressType = chip::Inet::IPAddressType::kAny);

CHIP_ERROR SingleBroadcastImpl(chip::System::PacketBufferHandle && data, uint16_t port,
chip::Inet::InterfaceId, chip::Inet::IPAddressType);
CHIP_ERROR SingleBroadcastImpl(chip::System::PacketBufferHandle && data, uint16_t port, chip::Inet::InterfaceId,
chip::Inet::IPAddressType);

static void OnUdpPacketReceived(chip::Inet::UDPEndPoint * endPoint, chip::System::PacketBufferHandle && buffer,
const chip::Inet::IPPacketInfo * info);
Expand All @@ -135,17 +135,16 @@ class Server
chip::Inet::IPAddress mIpv4BroadcastAddress;
#endif

struct BroadcastDestination {
struct BroadcastDestination
{
chip::Inet::InterfaceId interfaceId;
chip::Inet::IPAddressType addressType;

BroadcastDestination(chip::Inet::InterfaceId id, chip::Inet::IPAddressType type): interfaceId(id), addressType(type) {}
BroadcastDestination() : interfaceId(chip::Inet::InterfaceId::Null()),
addressType(chip::Inet::IPAddressType::kUnknown) {}

BroadcastDestination(chip::Inet::InterfaceId id, chip::Inet::IPAddressType type) : interfaceId(id), addressType(type) {}
BroadcastDestination() : interfaceId(chip::Inet::InterfaceId::Null()), addressType(chip::Inet::IPAddressType::kUnknown) {}
};
static constexpr size_t kMaxBroadcastDestinationCount = 20;
size_t mBroadcastDestinationCount = 0;
size_t mBroadcastDestinationCount = 0;
std::array<BroadcastDestination, kMaxBroadcastDestinationCount> mBroadcastDestination;

bool mIsInitialized = false;
Expand Down

0 comments on commit e040c1c

Please sign in to comment.