moonbridge

diff helloworld.lua @ 125:d9cc81641175

Code cleanup; Allow binding to specific interfaces
author jbe
date Tue Apr 14 00:26:38 2015 +0200 (2015-04-14)
parents 59f485dc48ea
children 37532927dba9
line diff
     1.1 --- a/helloworld.lua	Sun Apr 12 00:33:08 2015 +0200
     1.2 +++ b/helloworld.lua	Tue Apr 14 00:26:38 2015 +0200
     1.3 @@ -6,8 +6,8 @@
     1.4  local http = require "moonbridge_http"
     1.5  
     1.6  listen{
     1.7 -  { proto = "tcp4", port = 8080, localhost = true },
     1.8 -  { proto = "tcp6", port = 8080, localhost = true },
     1.9 +  { proto = "tcp", host = "127.0.0.1", port = 8080 },  -- IPv4
    1.10 +  { proto = "tcp", host = "::1",       port = 8080 },  -- IPv6
    1.11    connect = http.generate_handler(
    1.12      function(request)
    1.13        local function error_response(status)

Impressum / About Us