Class TelnetServer

java.lang.Object
io.github.protasm.jvmud.communication.transport.telnet.TelnetServer
All Implemented Interfaces:
AutoCloseable

public final class TelnetServer extends Object implements AutoCloseable
Private worker listener for one ready mudlib; public player admission belongs to the engine gateway.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TelnetServer(InstanceHost mud, String workerSecret)
    Creates a loopback worker listener authenticated by the engine's private relay secret.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Waits for the listener thread to finish.
    Returns the actual bound address, or the requested address before startup.
    void
    Closes sockets to release blocked readers, then waits for session detach work.
    int
    Returns the actual bound port, or the requested port before startup.
    void
    Binds the listener and starts accepting player connections.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TelnetServer

      public TelnetServer(InstanceHost mud, String workerSecret)
      Creates a loopback worker listener authenticated by the engine's private relay secret.
  • Method Details

    • start

      public void start() throws IOException
      Binds the listener and starts accepting player connections.
      Throws:
      IOException
    • await

      public void await() throws IOException
      Waits for the listener thread to finish.
      Throws:
      IOException
    • bindAddress

      public String bindAddress()
      Returns the actual bound address, or the requested address before startup.
    • port

      public int port()
      Returns the actual bound port, or the requested port before startup.
    • close

      public void close()
      Closes sockets to release blocked readers, then waits for session detach work.
      Specified by:
      close in interface AutoCloseable