Skip to content

Commit 07463b3

Browse files
author
Ran Yitzhaki
committed
change name from udp-reqres to udp-io
1 parent ffc166a commit 07463b3

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# udp-reqres
1+
# udp-io
22

33
> easy request response pattern for udp sockets, using nodejs dgram module.
44
@@ -7,7 +7,7 @@ A nicer interface to the built-in [`dgram`](http://nodejs.org/api/dgram.html) mo
77
## Install
88

99
```
10-
$ npm install --save udp-reqres
10+
$ npm install --save udp-io
1111
```
1212

1313
## Usage
@@ -23,9 +23,9 @@ this method returns an es6 Promise with the result from the "server".
2323
```js
2424
//on the "server"
2525

26-
const udpReqRes = require('udp-reqres');
26+
const udpIO = require('udp-io');
2727
const udpSocket = require('dgram').createSocket('udp4');
28-
const server = udpReqRes(udpSocket);
28+
const server = udpIO(udpSocket);
2929

3030
server.bind(33335);
3131

@@ -38,9 +38,9 @@ server.on('MY_AWESOME_EVENT', (res, cb) => {
3838
```js
3939
//on the "client"
4040

41-
const udpReqRes = require('udp-reqres');
41+
const udpIO = require('udp-io');
4242
const udpSocket = require('dgram').createSocket('udp4');
43-
const server = udpReqRes(udpSocket);
43+
const server = udpIO(udpSocket);
4444

4545
server.bind(33334);
4646

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "udp-reqres",
2+
"name": "udp-io",
33
"version": "1.0.5",
44
"description": "",
5-
"main": "./src/udp-reqres.js",
5+
"main": "./src/udp-io.js",
66
"scripts": {
77
"test": "gulp test"
88
},

serverPing.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const udpReqRes = require('./src/udp-reqres');
1+
const udpIO = require('./src/udp-io');
22
const udpSocket = require('dgram').createSocket('udp4');
3-
const server = udpReqRes(udpSocket);
3+
const server = udpIO(udpSocket);
44

55
server.bind(33334);
66

serverPong.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const udpReqRes = require('./src/udp-reqres');
1+
const udpIO = require('./src/udp-io');
22
const udpSocket = require('dgram').createSocket('udp4');
3-
const server = udpReqRes(udpSocket);
3+
const server = udpIO(udpSocket);
44

55
server.bind(33335);
66

File renamed without changes.

tests/index.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
const udpReqres = require('./../src/udp-reqres');
1+
const udpIO = require('./../src/udp-io');
22
let udpServerMock;
33

44
const createUdpServer = (host, port) => {
5-
const server = udpReqres(udpServerMock);
5+
const server = udpIO(udpServerMock);
66
server.bind(host, port);
77
return server;
88
};
99

1010

11-
describe('udp-reqres', () => {
11+
describe('udp-io', () => {
1212
beforeEach(() => {
1313
udpServerMock = {
1414
bind: jasmine.createSpy(),
@@ -20,7 +20,7 @@ describe('udp-reqres', () => {
2020
it('should call the udpServer with the host and port', () => {
2121
const host = 'www.mayTheUdpSocketsBeWithYou.com';
2222
const port = 42;
23-
const server = udpReqres(udpServerMock);
23+
const server = udpIO(udpServerMock);
2424
server.bind(host, port);
2525
expect(udpServerMock.bind).toHaveBeenCalledWith(host, port);
2626
});

0 commit comments

Comments
 (0)