Class NetherNetChildChannel

java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
org.cloudburstmc.netty.channel.nethernet.NetherNetChannel
org.cloudburstmc.netty.channel.nethernet.NetherNetChildChannel
All Implemented Interfaces:
io.netty.channel.Channel, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap, Comparable<io.netty.channel.Channel>, org.cloudburstmc.netty.channel.TransportChannel

public class NetherNetChildChannel extends NetherNetChannel
  • Field Details

    • CONNECTION_ID

      public static final io.netty.util.AttributeKey<String> CONNECTION_ID
      The signaling connection ID this channel was accepted for.

      A child arrives on the server pipeline carrying nothing that ties it back to the offer that produced it, and arrival order does not follow the order answers were produced in.

    • PLAYER_INFO

      public static final io.netty.util.AttributeKey<PlayerInfo> PLAYER_INFO
      The peer whose validated identity assertion opened this channel, when the signaling that accepted it validates one. Signaling that carries no identity leaves it unset, so treat an absent value as an unauthenticated transport rather than an authenticated one.

      Whatever identity your protocol presents after the transport is up is not tied to this one. Compare the two, through PlayerInfo.clientPublicKey(), or a peer can replay an identity it captured from somewhere else.

  • Constructor Details

    • NetherNetChildChannel

      public NetherNetChildChannel(io.netty.channel.Channel parent, tel.schich.libdatachannel.PeerConnection peerConnection, @Nullable SourcedAddress signaled, InetSocketAddress local)
      Parameters:
      signaled - Where signaling met the peer, see NetherNetChannel.signaledAddress(), or null when it never did
  • Method Details

    • acceptDataChannel

      public boolean acceptDataChannel(tel.schich.libdatachannel.DataChannel channel)
      Takes a data channel the remote opened, reading it from now on and activating this channel once both are in. An unknown or duplicate one is closed, and the connection carries on without it. Safe to call from a libdatachannel callback, also before this channel is registered.
      Parameters:
      channel - The data channel the remote opened
      Returns:
      Whether this completed the pair
    • newUnsafe

      protected io.netty.channel.AbstractChannel.AbstractUnsafe newUnsafe()
      Specified by:
      newUnsafe in class io.netty.channel.AbstractChannel
    • doBind

      protected void doBind(SocketAddress localAddress) throws Exception
      Overrides:
      doBind in class NetherNetChannel
      Throws:
      Exception