Class: Connection

Connection(url, optionsopt)

Represents a single connection to a Gremlin Server.

Constructor

new Connection(url, optionsopt)

Creates a new instance of Connection.
Parameters:
Name Type Attributes Description
url String The resource uri.
options Object <optional>
The connection options.
Properties
Name Type Attributes Description
ca Array <optional>
Trusted certificates.
cert String | Array | Buffer <optional>
The certificate key.
mimeType String <optional>
The mime type to use.
pfx String | Buffer <optional>
The private key, certificate, and CA certs.
reader GraphSONReader <optional>
The reader to use.
rejectUnauthorized Boolean <optional>
Determines whether to verify or not the server certificate.
traversalSource String <optional>
The traversal source. Defaults to: 'g'.
writer GraphSONWriter <optional>
The writer to use.
authenticator Authenticator <optional>
The authentication handler to use.
headers Object <optional>
An associative array containing the additional header key/values for the initial request.
enableUserAgentOnConnect Boolean <optional>
Determines if a user agent will be sent during connection handshake. Defaults to: true
pingEnabled Boolean <optional>
Setup ping interval. Defaults to: true.
pingInterval Number <optional>
Ping request interval in ms if ping enabled. Defaults to: 60000.
pongTimeout Number <optional>
Timeout of pong response in ms after sending a ping. Defaults to: 30000.
Source:

Members

mimeType :String

Gets the MIME type.
Type:
  • String
Source:

Methods

_cleanupWebsocket()

clean websocket context
Source:

close() → {Promise}

Closes the Connection.
Source:
Returns:
Type
Promise

open() → {Promise}

Opens the connection, if its not already opened.
Source:
Returns:
Type
Promise

stream()

Source:

submit()

Source: