implicit final class ServerEvents extends AnyVal
Server Events
- Alphabetic
- By Inheritance
- ServerEvents
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
closeFuture(): Future[Unit]
- Annotations
- @inline()
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
getConnectionsFuture: Future[Int]
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
listenFuture(options: ListenerOptions): Future[Unit]
- Annotations
- @inline()
-
def
onCheckContinue(callback: (ClientRequest, ServerResponse) ⇒ Any): server.type
Emitted each time a request with an http Expect: 100-continue is received.
Emitted each time a request with an http Expect: 100-continue is received. If this event isn't listened for, the server will automatically respond with a 100 Continue as appropriate.
Handling this event involves calling response.writeContinue() if the client should continue to send the request body, or generating an appropriate HTTP response (e.g., 400 Bad Request) if the client should not continue to send the request body.
Note that when this event is emitted and handled, the 'request' event will not be emitted.
- Annotations
- @inline()
server.on("checkContinue", function (request, response) { ... })
Example: -
def
onClientError(callback: (SystemError, Socket) ⇒ Any): server.type
If a client connection emits an 'error' event, it will be forwarded here.
If a client connection emits an 'error' event, it will be forwarded here. Listener of this event is responsible for closing/destroying the underlying socket. For example, one may wish to more gracefully close the socket with an HTTP '400 Bad Request' response instead of abruptly severing the connection.
Default behavior is to destroy the socket immediately on malformed request.
socket is the net.Socket object that the error originated from.
- Annotations
- @inline()
server.on("clientError", function (exception, socket) { ... })
Example: -
def
onConnect(callback: Function): server.type
- Annotations
- @inline()
-
def
onRequest(callback: Function): server.type
- Annotations
- @inline()
-
def
onUpgrade(callback: Function): server.type
- Annotations
- @inline()
- val server: Server
-
def
toString(): String
- Definition Classes
- Any