Interface BroadcastIoSession

All Superinterfaces:
IoSession

public interface BroadcastIoSession extends IoSession
An IoSession for broadcast transports. (e.g. UDP broadcast or multicast)

Writing Back to the Broadcasting Server

When you implement a client that receives a broadcast message from a server such as DHCP server, the client might need to send a response message for the broadcast message the server sent. Because the remote address of the session is not the address of the server in case of broadcasting, there should be a way to specify the destination when you write the response message. This interface provides write(Object, SocketAddress) method so you can specify the destination.

  • Method Details

    • write

      WriteFuture write(Object message, SocketAddress destination)
      Writes the specified message to the specified destination. This operation is asynchronous; IoHandler.messageSent(IoSession, Object) will be invoked when the message is actually sent to remote peer. You can also wait for the returned WriteFuture if you want to wait for the message actually written.
      Parameters:
      destination - null if you want the message sent to the default remote address