Class HttpServer

java.lang.Object
cool.scx.http.x.HttpServer
All Implemented Interfaces:
cool.scx.http.ScxHttpServer

public class HttpServer extends Object implements cool.scx.http.ScxHttpServer
Http 服务器
Version:
0.0.1
Author:
scx567888
  • Constructor Details

    • HttpServer

      public HttpServer(HttpServerOptions options)
    • HttpServer

      public HttpServer()
  • Method Details

    • onRequest

      public cool.scx.http.ScxHttpServer onRequest(cool.scx.function.Function1Void<cool.scx.http.ScxHttpServerRequest, ?> requestHandler)
      Specified by:
      onRequest in interface cool.scx.http.ScxHttpServer
    • onError

      public cool.scx.http.ScxHttpServer onError(cool.scx.http.error_handler.ScxHttpServerErrorHandler errorHandler)
      Specified by:
      onError in interface cool.scx.http.ScxHttpServer
    • start

      public void start(SocketAddress localAddress) throws IOException
      Specified by:
      start in interface cool.scx.http.ScxHttpServer
      Throws:
      IOException
    • stop

      public void stop()
      Specified by:
      stop in interface cool.scx.http.ScxHttpServer
    • localAddress

      public InetSocketAddress localAddress()
      Specified by:
      localAddress in interface cool.scx.http.ScxHttpServer
    • options

      public HttpServerOptions options()