diff --git a/.brackets.json b/.brackets.json deleted file mode 100644 index 42bf8a6..0000000 --- a/.brackets.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "sbruchmann.staticpreview.basepath": "/home/bmiller/git/node-ipc/" -} diff --git a/README.md b/README.md index 724b255..e398916 100644 --- a/README.md +++ b/README.md @@ -355,8 +355,8 @@ Used to create TCP, TLS or UDP Socket Server to which Clients can bind or other | variable | required | definition | |----------|----------|------------| | host | optional | If not specified this defaults to the first address in os.networkInterfaces(). For TCP, TLS & UDP servers this is most likely going to be 127.0.0.1 or ::1 | -| port | optional | The port on wunich the TCP, UDP, or TLS Socket server will be bound, this defaults to 8000 if not specified | -| UDPType | optional | If set this will create the server as a UDP socket. 'udp4' or 'udp6' are valid values. This defaults to not being set. +| port | optional | The port on which the TCP, UDP, or TLS Socket server will be bound, this defaults to 8000 if not specified | +| UDPType | optional | If set this will create the server as a UDP socket. 'udp4' or 'udp6' are valid values. This defaults to not being set. When using udp6 make sure to specify a valid IPv6 host, like ` ::1 ` | | callback | optional | Function to be called when the server is created | ***examples*** arguments can be ommitted solong as they are still in order. diff --git a/example/UDPSocket/basic/world-server.js b/example/UDPSocket/basic/world-server.js index 75d46a9..b305d4e 100644 --- a/example/UDPSocket/basic/world-server.js +++ b/example/UDPSocket/basic/world-server.js @@ -1,22 +1,22 @@ var ipc=require('../../../node-ipc'); /***************************************\ - * + * * UDP Client is really a UDP server - * - * Dedicated UDP sockets on the same + * + * Dedicated UDP sockets on the same * machine can not be bound to in the * traditional client/server method - * + * * Every UDP socket is it's own UDP server * And so must have a unique port on its * machine, unlike TCP or Unix Sockts * which can share on the same machine. - * + * * Since there is no open client server * relationship, you should start world * first and then hello. - * + * ***************************************/ ipc.config.id = 'world'; @@ -45,4 +45,4 @@ ipc.serveNet( -ipc.server.start(); \ No newline at end of file +ipc.server.start(); diff --git a/lib/socketServer.js b/lib/socketServer.js index 62b413b..94130b0 100644 --- a/lib/socketServer.js +++ b/lib/socketServer.js @@ -295,7 +295,7 @@ function init(path,config,log,port){ return; } - if(!server.udp4 && !server.udp4){ + if(!server.udp4 && !server.udp6){ server.log('starting server as'.debug, (server.config.tls?'TLS':'TCP').variable); server.server.listen( server.port,