Class NettyServer
java.lang.Object
dev.tachyonmcp.core.transport.netty.NettyServer
- All Implemented Interfaces:
Closeable,AutoCloseable
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 Summary
ConstructorsConstructorDescriptionNettyServer(int port, ServerEngine server) NettyServer(ServerEngine server, NettyServerConfig config) -
Method Summary
-
Constructor Details
-
NettyServer
-
NettyServer
-
-
Method Details
-
port
public int port()Returns the port the server is bound to. -
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-