@toa.io/bindings.http 0.2.1-dev.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/bindings.http",
3
- "version": "0.2.1-dev.3",
3
+ "version": "0.3.0",
4
4
  "description": "Toa HTTP Binding",
5
5
  "author": "temich <tema.gurtovoy@gmail.com>",
6
6
  "homepage": "https://github.com/toa-io/toa#readme",
package/src/consumer.js CHANGED
@@ -19,7 +19,7 @@ class Consumer extends Connector {
19
19
  this.#endpoint = endpoint
20
20
  }
21
21
 
22
- async connection () {
22
+ async open () {
23
23
  this.#url = Consumer.#locate(this.#locator, this.#endpoint)
24
24
  }
25
25
 
package/src/server.js CHANGED
@@ -29,7 +29,7 @@ class Server extends Connector {
29
29
  })
30
30
  }
31
31
 
32
- async connection () {
32
+ async open () {
33
33
  return new Promise((resolve, reject) => {
34
34
  this.#server = this.#app.listen(this.#port, () => {
35
35
  console.info(`HTTP server started at :${this.#port}`)
@@ -42,7 +42,7 @@ class Server extends Connector {
42
42
  })
43
43
  }
44
44
 
45
- async disconnection () {
45
+ async close () {
46
46
  return new Promise((resolve, reject) => {
47
47
  this.#server.close(() => {
48
48
  console.info(`HTTP server at :${this.#port} stopped`)