zeroconf: 1st implementation try (http.tcp ok, osc.udp not sure) (issue #118)
This commit is contained in:
parent
f062faf581
commit
e74d892e3d
4 changed files with 24 additions and 6 deletions
|
|
@ -6,6 +6,7 @@ var express = require('express')(),
|
|||
io = require('socket.io')(server),
|
||||
ipc = {},
|
||||
settings = require('./settings'),
|
||||
zeroconf = require('./zeroconf'),
|
||||
appAddresses = settings.read('appAddresses'),
|
||||
clients = {}
|
||||
|
||||
|
|
@ -27,6 +28,12 @@ express.get('*', function(req, res){
|
|||
|
||||
server.listen(settings.read('httpPort'))
|
||||
|
||||
zeroconf.publish({
|
||||
name: settings.read('appName'),
|
||||
type: 'http',
|
||||
port: settings.read('httpPort')
|
||||
})
|
||||
|
||||
ipc.send = function(name,data,clientId) {
|
||||
if (clientId) {
|
||||
io.to(clientId).emit(name,data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue