Interface MessageConnection

All Known Subinterfaces:
Client, HostedConnection, NetworkClient
All Known Implementing Classes:
DefaultClient, DefaultServer.Connection, Network.NetworkClientImpl

public interface MessageConnection
The source of a received message and the common abstract interface of client->server and server->client objects.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Indicates the default reliable channel that is used when calling the channel-less send() with a reliable message.
    static final int
    Indicates the default unreliable channel that is used when calling the channel-less send() with a reliable=false message.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    send(int channel, Message message)
    Sends a message to the other end of the connection using the specified alternate channel.
    void
    send(Message message)
    Sends a message to the other end of the connection.
  • Field Details

    • CHANNEL_DEFAULT_RELIABLE

      static final int CHANNEL_DEFAULT_RELIABLE
      Indicates the default reliable channel that is used when calling the channel-less send() with a reliable message. This channel number can be used in the send(channel, msg) version of send.

      Normally, callers should just call the regular non-channel send message but these channel numbers are useful for extensions that allow the user to specify a channel and want to still support the default channels.

      See Also:
    • CHANNEL_DEFAULT_UNRELIABLE

      static final int CHANNEL_DEFAULT_UNRELIABLE
      Indicates the default unreliable channel that is used when calling the channel-less send() with a reliable=false message. This channel number can be used in the send(channel, msg) version of send.

      Normally, callers should just call the regular non-channel send message but these channel numbers are useful for extensions that allow the user to specify a channel and want to still support the default channels.

      See Also:
  • Method Details

    • send

      void send(Message message)
      Sends a message to the other end of the connection.
    • send

      void send(int channel, Message message)
      Sends a message to the other end of the connection using the specified alternate channel.