Class BroadcastingClient
java.lang.Object
com.bytedesk.core.cluster.udp.broadcast.BroadcastingClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate InetAddress
private byte[]
private int
private DatagramSocket
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
broadcastPacket
(InetAddress address) void
close()
private void
int
discoverServers
(String msg) private void
(package private) List<InetAddress>
private void
private 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()
-