Class ConnectionHandshakeSegment

java.lang.Object
io.netty.buffer.DefaultByteBufHolder
org.drasyl.handler.connection.ConnectionHandshakeSegment
All Implemented Interfaces:
io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted

public class ConnectionHandshakeSegment extends io.netty.buffer.DefaultByteBufHolder
A message used by ConnectionHandshakeHandler to perform a handshake.

The synchronization process has been heavily inspired by the three-way handshake of TCP (RFC 793).

  • Field Details

  • Constructor Details

    • ConnectionHandshakeSegment

      public ConnectionHandshakeSegment(long seq, long ack, byte ctl, io.netty.buffer.ByteBuf data)
  • Method Details

    • seq

      public long seq()
    • ack

      public long ack()
    • ctl

      public int ctl()
    • isUrg

      public boolean isUrg()
    • isAck

      public boolean isAck()
    • isOnlyAck

      public boolean isOnlyAck()
    • isPsh

      public boolean isPsh()
    • isRst

      public boolean isRst()
    • isSyn

      public boolean isSyn()
    • isFin

      public boolean isFin()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class io.netty.buffer.DefaultByteBufHolder
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class io.netty.buffer.DefaultByteBufHolder
    • toString

      public String toString()
      Overrides:
      toString in class io.netty.buffer.DefaultByteBufHolder
    • ack

      public static ConnectionHandshakeSegment ack(long seq, long ack)
    • rst

      public static ConnectionHandshakeSegment rst(long seq)
    • syn

      public static ConnectionHandshakeSegment syn(long seq)
    • pshAck

      public static ConnectionHandshakeSegment pshAck(long seq, long ack, io.netty.buffer.ByteBuf data)
    • rstAck

      public static ConnectionHandshakeSegment rstAck(long seq, long ack)
    • synAck

      public static ConnectionHandshakeSegment synAck(long seq, long ack)
    • finAck

      public static ConnectionHandshakeSegment finAck(long seq, long ack)