-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.coffee
29 lines (26 loc) · 1.13 KB
/
run.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
upnp = require './lib/upnp'
Device = require './lib/device'
PrivateServer = require './lib/private-server'
user32 = require './lib/user32'
kernel32 = require './lib/kernel32'
utils = require './lib/utils'
RemoteMouseService = require './lib/services/remote-mouse'
RemoteControlService = require './lib/services/remote-control'
privateServer = new PrivateServer 3001
privateServer.addService "RemoteMouseService", new RemoteMouseService()
privateServer.start()
class MyDevice extends Device
constructor: ->
super('RemoteControl', {
version: 1,
# uuid: 'd2af1bd6-09d6-4669-8fc4-c04ccc4ffd8b',
uuid: '63af7043-7b8d-45e5-9702-2ed9b3fef45b',
services: {
"RemoteControl": new RemoteControlService(privateServer)
}
})
#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ssdpServer = new upnp.Upnp(new MyDevice(), 3000);
ssdpServer.on "error", (err) ->
console.log err
ssdpServer.start();