Guest User

Untitled

a guest
Jan 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. strData1 =
  2. 'HTTP/1.1 200 OK' ..
  3. 'HOST: 239.255.255.250:1900'..
  4. 'CACHE-CONTROL: max-age=100'..
  5. 'EXT:'..
  6. 'LOCATION: http://192.168.1.152:49153/description.xml'..
  7. 'SERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.19.0'..
  8. 'hue-bridgeid: B8AC6FFFFEC53475'..
  9. 'ST: upnp:rootdevice'..
  10. 'USN: uuid:2f402f80-da50-11e1-9b23-b8ac6fc53475::upnp:rootdevice'
  11.  
  12. local socket = require "socket"
  13. local udp = socket.udp()
  14.  
  15. udp:settimeout(0)
  16. udp:setsockname('*', 1900)
  17. udp:setpeername('192.168.1.102', 50000) -- Echo IP and Port number
  18. udp:sendto(Data,'192.168.1.102',50000)
Add Comment
Please, Sign In to add comment