Class NettyServer

java.lang.Object
dev.tachyonmcp.core.transport.netty.NettyServer
All Implemented Interfaces:
Closeable, AutoCloseable

public final class NettyServer extends Object implements Closeable
Netty-based MCP server with Streamable HTTP transport. Detects the best available I/O transport (io_uring, epoll, kqueue, NIO) via NettyIoEngine.detect() and binds a ServerBootstrap with the MCP pipeline defined by McpChannelInitializer.
  • Constructor Details

  • Method Details

    • port

      public int port()
      Returns the port the server is bound to.
    • host

      public String host()
      Returns the host the server is bound to.
    • stopAccepting

      public void stopAccepting()
      Stops accepting new connections by closing the server channel. Existing child channels and event loops stay alive so in-flight requests can complete and flush. Idempotent; close() finishes the teardown.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable