make listen script more generic, accept server endpoint / wlan interface / etc as parameters rather than being hard-coded