Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[protocol] fix protocol documentation #163

Merged
merged 4 commits into from
Dec 1, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/protocols/1/essentials/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ module.exports = class MyProtocol {
handleClient () {
// when a client connects
this.on('onClientConnect', client => {
const connection = new context.constructor.ClientConnection(
const connection = new this.context.ClientConnection(
this.name,
[client.connection.stream.remoteAddress],
{some: 'header'}
Expand All @@ -160,7 +160,7 @@ module.exports = class MyProtocol {
// Instantiates a Request object to be passed to Kuzzle
const
connection = this.connections[client.id],
request = new this.context.Request(data, this.connections[client.id]);
request = new this.context.Request(data, { connection });

this.entryPoint.execute(request, response => {
// forward the response to the client
Expand Down