Class EOS_P2P_SocketId

java.lang.Object
com.sun.jna.Structure
host.anzo.eossdk.eos.sdk.p2p.EOS_P2P_SocketId
Direct Known Subclasses:
EOS_P2P_SocketId.ByReference, EOS_P2P_SocketId.ByValue

@FieldOrder({"ApiVersion","SocketName"}) public class EOS_P2P_SocketId extends com.sun.jna.Structure
P2P Socket ID

The Socket ID contains an application-defined name for the connection between a local person and another peer.

When a remote user receives a connection request from you, they will receive this information. It can be important to only accept connections with a known socket-name and/or from a known user, to prevent leaking of private information, such as a user's IP address. Using the socket name as a secret key can help prevent such leaks. Shared private data, like a private match's Session ID are good candidates for a socket name.

Since:
8/21/2023
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     

    Nested classes/interfaces inherited from class com.sun.jna.Structure

    com.sun.jna.Structure.FieldOrder, com.sun.jna.Structure.StructField
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    API Version: Set this to EOS_P2P_SOCKETID_API_LATEST.
    static final int
    The most recent version of the EOS_P2P_SocketId structure.
    static final int
    The total buffer size of a EOS_P2P_SocketId SocketName, including space for the null-terminator
    A name for the connection.

    Fields inherited from class com.sun.jna.Structure

    ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    EOS_P2P_SocketId(com.sun.jna.Pointer peer)
     
  • Method Summary

    Methods inherited from class com.sun.jna.Structure

    allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EOS_P2P_SOCKETID_API_LATEST

      public static final int EOS_P2P_SOCKETID_API_LATEST
      The most recent version of the EOS_P2P_SocketId structure.
      See Also:
    • EOS_P2P_SOCKETID_SOCKETNAME_SIZE

      public static final int EOS_P2P_SOCKETID_SOCKETNAME_SIZE
      The total buffer size of a EOS_P2P_SocketId SocketName, including space for the null-terminator
      See Also:
    • ApiVersion

      public int ApiVersion
      API Version: Set this to EOS_P2P_SOCKETID_API_LATEST.
    • SocketName

      public String SocketName
      A name for the connection. Must be a NULL-terminated string of between 1-32 (EOS_P2P_SOCKETID_SOCKETNAME_SIZE) alpha-numeric characters (A-Z, a-z, 0-9, '-', '_', ' ', '+', '=', '.')
  • Constructor Details

    • EOS_P2P_SocketId

      public EOS_P2P_SocketId()
    • EOS_P2P_SocketId

      public EOS_P2P_SocketId(com.sun.jna.Pointer peer)