Class BroadcastingClient
java.lang.Object
com.bytedesk.core.cluster.udp.broadcast.BroadcastingClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate InetAddressprivate byte[]private intprivate DatagramSocket -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbroadcastPacket(InetAddress address) voidclose()private voidintdiscoverServers(String msg) private void(package private) List<InetAddress>private voidprivate int
-
Field Details
-
socket
-
address
-
expectedServerCount
private int expectedServerCount -
buf
private byte[] buf
-
-
Constructor Details
-
BroadcastingClient
- Throws:
Exception
-
-
Method Details
-
discoverServers
- Throws:
IOException
-
listAllBroadcastAddresses
- Throws:
SocketException
-
initializeSocketForBroadcasting
- Throws:
SocketException
-
copyMessageOnBuffer
-
broadcastPacket
- Throws:
IOException
-
receivePackets
- Throws:
IOException
-
receivePacket
- Throws:
IOException
-
close
public void close()
-