LMMS
Loading...
Searching...
No Matches
juce_IPAddress.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
33{
34public:
35 //==============================================================================
37 static IPAddress any() noexcept;
38
40 static IPAddress broadcast() noexcept;
41
43 static IPAddress local (bool IPv6 = false) noexcept;
44
45 //==============================================================================
47 static void findAllAddresses (Array<IPAddress>& results, bool includeIPv6 = false);
48
50 static Array<IPAddress> getAllAddresses (bool includeIPv6 = false);
51
58 static IPAddress getLocalAddress (bool includeIPv6 = false);
59
60 //==============================================================================
62 IPAddress() noexcept;
63
68 explicit IPAddress (const uint8* bytes, bool IPv6 = false) noexcept;
69
73 explicit IPAddress (const uint16* bytes) noexcept;
74
76 IPAddress (uint8 address1, uint8 address2, uint8 address3, uint8 address4) noexcept;
77
79 IPAddress (uint16 address1, uint16 address2, uint16 address3, uint16 address4,
80 uint16 address5, uint16 address6, uint16 address7, uint16 address8) noexcept;
81
85 explicit IPAddress (uint32 asNativeEndian32Bit) noexcept;
86
88 explicit IPAddress (const String& address);
89
91 bool isNull() const;
92
93 //==============================================================================
96
103
104 bool operator== (const IPAddress&) const noexcept;
105 bool operator!= (const IPAddress&) const noexcept;
106 bool operator< (const IPAddress&) const noexcept;
107 bool operator> (const IPAddress&) const noexcept;
108 bool operator<= (const IPAddress&) const noexcept;
109 bool operator>= (const IPAddress&) const noexcept;
110
111 //==============================================================================
114
115 bool isIPv6 = false;
116
117 //==============================================================================
123 static String getFormattedAddress (const String& unformattedAddress);
124
126 static bool isIPv4MappedAddress (const IPAddress& mappedAddress);
127
132
135
139 static IPAddress getInterfaceBroadcastAddress (const IPAddress& interfaceAddress);
140};
141
142} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
#define final
Definition DistrhoDefines.h:74
Definition juce_Array.h:56
static Array< IPAddress > getAllAddresses(bool includeIPv6=false)
Definition juce_IPAddress.cpp:368
static IPAddress getLocalAddress(bool includeIPv6=false)
Definition juce_IPAddress.cpp:357
bool isNull() const
Definition juce_IPAddress.cpp:101
static bool isIPv4MappedAddress(const IPAddress &mappedAddress)
Definition juce_IPAddress.cpp:320
static IPAddress getInterfaceBroadcastAddress(const IPAddress &interfaceAddress)
Definition juce_posix_IPAddress.h:131
static IPAddress any() noexcept
Definition juce_IPAddress.cpp:241
static String getFormattedAddress(const String &unformattedAddress)
Definition juce_IPAddress.cpp:246
int compare(const IPAddress &) const noexcept
Definition juce_IPAddress.cpp:214
String toString() const
Definition juce_IPAddress.cpp:177
static void findAllAddresses(Array< IPAddress > &results, bool includeIPv6=false)
Definition juce_posix_IPAddress.h:124
static IPAddress broadcast() noexcept
Definition juce_IPAddress.cpp:242
uint8 address[16]
Definition juce_IPAddress.h:113
bool isIPv6
Definition juce_IPAddress.h:115
IPAddress(const uint8 *bytes, bool IPv6=false) noexcept
static IPAddress convertIPv4AddressToIPv4Mapped(const IPAddress &addressToMap)
Definition juce_IPAddress.cpp:347
static IPAddress convertIPv4MappedAddressToIPv4(const IPAddress &mappedAddress)
Definition juce_IPAddress.cpp:335
IPAddress() noexcept
Definition juce_IPAddress.cpp:39
Definition juce_String.h:53
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
unsigned short uint16
Definition juce_MathsFunctions.h:41
unsigned int uint32
Definition juce_MathsFunctions.h:45
unsigned char uint8
Definition juce_MathsFunctions.h:37
#define false
Definition ordinals.h:83
#define local
Definition zip.h:20
#define const
Definition zconf.h:137