Server

@JSImport("tls", "Server") @native @JSType class Server() extends StObject
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Constructors

def this(options: TlsOptions)
def this(secureConnectionListener: Function1[TLSSocket, Unit])
def this(options: TlsOptions, secureConnectionListener: Function1[TLSSocket, Unit])

Concrete methods

def addContext(hostName: String, credentials: SecureContextOptions): Unit

The server.addContext() method adds a secure context that will be used if the client request's SNI name matches the supplied hostname (or wildcard).

The server.addContext() method adds a secure context that will be used if the client request's SNI name matches the supplied hostname (or wildcard).

def addListener(event: String, listener: Function1[Any, Unit]): Server

events.EventEmitter

events.EventEmitter

  1. tlsClientError
  2. newSession
  3. OCSPRequest
  4. resumeSession
  5. secureConnection
  6. keylog
@JSName("addListener")
def addListener_OCSPRequest(event: OCSPRequest, listener: Function3[Buffer, Buffer, Function2[Error | Null, Buffer, Unit], Unit]): Server
@JSName("addListener")
def addListener_keylog(event: keylog, listener: Function2[Buffer, TLSSocket, Unit]): Server
@JSName("addListener")
def addListener_newSession(event: newSession, listener: Function3[Buffer, Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("addListener")
def addListener_resumeSession(event: resumeSession, listener: Function2[Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("addListener")
def addListener_secureConnection(event: secureConnection, listener: Function1[TLSSocket, Unit]): Server
@JSName("addListener")
def addListener_tlsClientError(event: tlsClientError, listener: Function2[Error, TLSSocket, Unit]): Server
def emit(event: String, args: Any*): Boolean
def emit(event: Symbol, args: Any*): Boolean
@JSName("emit")
def emit_OCSPRequest(event: OCSPRequest, certificate: Buffer, issuer: Buffer, callback: Function2[Error | Null, Buffer, Unit]): Boolean
@JSName("emit")
def emit_keylog(event: keylog, line: Buffer, tlsSocket: TLSSocket): Boolean
@JSName("emit")
def emit_newSession(event: newSession, sessionId: Buffer, sessionData: Buffer, callback: Function2[Error, Buffer, Unit]): Boolean
@JSName("emit")
def emit_resumeSession(event: resumeSession, sessionId: Buffer, callback: Function2[Error, Buffer, Unit]): Boolean
@JSName("emit")
def emit_secureConnection(event: secureConnection, tlsSocket: TLSSocket): Boolean
@JSName("emit")
def emit_tlsClientError(event: tlsClientError, err: Error, tlsSocket: TLSSocket): Boolean

Returns the session ticket keys.

Returns the session ticket keys.

def on(event: String, listener: Function1[Any, Unit]): Server
@JSName("on")
def on_OCSPRequest(event: OCSPRequest, listener: Function3[Buffer, Buffer, Function2[Error | Null, Buffer, Unit], Unit]): Server
@JSName("on")
def on_keylog(event: keylog, listener: Function2[Buffer, TLSSocket, Unit]): Server
@JSName("on")
def on_newSession(event: newSession, listener: Function3[Buffer, Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("on")
def on_resumeSession(event: resumeSession, listener: Function2[Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("on")
def on_secureConnection(event: secureConnection, listener: Function1[TLSSocket, Unit]): Server
@JSName("on")
def on_tlsClientError(event: tlsClientError, listener: Function2[Error, TLSSocket, Unit]): Server
def once(event: String, listener: Function1[Any, Unit]): Server
@JSName("once")
def once_OCSPRequest(event: OCSPRequest, listener: Function3[Buffer, Buffer, Function2[Error | Null, Buffer, Unit], Unit]): Server
@JSName("once")
def once_keylog(event: keylog, listener: Function2[Buffer, TLSSocket, Unit]): Server
@JSName("once")
def once_newSession(event: newSession, listener: Function3[Buffer, Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("once")
def once_resumeSession(event: resumeSession, listener: Function2[Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("once")
def once_secureConnection(event: secureConnection, listener: Function1[TLSSocket, Unit]): Server
@JSName("once")
def once_tlsClientError(event: tlsClientError, listener: Function2[Error, TLSSocket, Unit]): Server
def prependListener(event: String, listener: Function1[Any, Unit]): Server
@JSName("prependListener")
def prependListener_OCSPRequest(event: OCSPRequest, listener: Function3[Buffer, Buffer, Function2[Error | Null, Buffer, Unit], Unit]): Server
@JSName("prependListener")
def prependListener_keylog(event: keylog, listener: Function2[Buffer, TLSSocket, Unit]): Server
@JSName("prependListener")
def prependListener_newSession(event: newSession, listener: Function3[Buffer, Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("prependListener")
def prependListener_resumeSession(event: resumeSession, listener: Function2[Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("prependListener")
def prependListener_secureConnection(event: secureConnection, listener: Function1[TLSSocket, Unit]): Server
@JSName("prependListener")
def prependListener_tlsClientError(event: tlsClientError, listener: Function2[Error, TLSSocket, Unit]): Server
def prependOnceListener(event: String, listener: Function1[Any, Unit]): Server
@JSName("prependOnceListener")
def prependOnceListener_OCSPRequest(event: OCSPRequest, listener: Function3[Buffer, Buffer, Function2[Error | Null, Buffer, Unit], Unit]): Server
@JSName("prependOnceListener")
def prependOnceListener_keylog(event: keylog, listener: Function2[Buffer, TLSSocket, Unit]): Server
@JSName("prependOnceListener")
def prependOnceListener_newSession(event: newSession, listener: Function3[Buffer, Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("prependOnceListener")
def prependOnceListener_resumeSession(event: resumeSession, listener: Function2[Buffer, Function2[Error, Buffer, Unit], Unit]): Server
@JSName("prependOnceListener")
def prependOnceListener_secureConnection(event: secureConnection, listener: Function1[TLSSocket, Unit]): Server
@JSName("prependOnceListener")
def prependOnceListener_tlsClientError(event: tlsClientError, listener: Function2[Error, TLSSocket, Unit]): Server

The server.setSecureContext() method replaces the secure context of an existing server. Existing connections to the server are not interrupted.

The server.setSecureContext() method replaces the secure context of an existing server. Existing connections to the server are not interrupted.

def setTicketKeys(keys: Buffer): Unit

The server.setSecureContext() method replaces the secure context of an existing server. Existing connections to the server are not interrupted.

The server.setSecureContext() method replaces the secure context of an existing server. Existing connections to the server are not interrupted.

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object