updated udpType handling fixes #49
This commit is contained in:
parent
57a813124e
commit
a8ea63eca6
4 changed files with 10 additions and 13 deletions
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"sbruchmann.staticpreview.basepath": "/home/bmiller/git/node-ipc/"
|
|
||||||
}
|
|
|
@ -355,8 +355,8 @@ Used to create TCP, TLS or UDP Socket Server to which Clients can bind or other
|
||||||
| variable | required | definition |
|
| 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 |
|
| 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 |
|
| 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.
|
| 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 |
|
| callback | optional | Function to be called when the server is created |
|
||||||
|
|
||||||
***examples*** arguments can be ommitted solong as they are still in order.
|
***examples*** arguments can be ommitted solong as they are still in order.
|
||||||
|
|
|
@ -295,7 +295,7 @@ function init(path,config,log,port){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!server.udp4 && !server.udp4){
|
if(!server.udp4 && !server.udp6){
|
||||||
server.log('starting server as'.debug, (server.config.tls?'TLS':'TCP').variable);
|
server.log('starting server as'.debug, (server.config.tls?'TLS':'TCP').variable);
|
||||||
server.server.listen(
|
server.server.listen(
|
||||||
server.port,
|
server.port,
|
||||||
|
|
Loading…
Reference in a new issue