Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1011858 // serveHttp_multiplePorts

JavaX fragment (include)

static L<MyHTTPD> serveHttp_multiplePorts_servers = synchroList();

static void serveHttp_multiplePorts(int... ports) ctex {
  for (int port : ports) {
    MyHTTPD httpd = new MyHTTPD(port);
    serveHttp_multiplePorts_servers.add(httpd);
    httpd.start();
  }
}

static void cleanMeUp_serveHttp_multiplePorts() {
  for (MyHTTPD httpd : cloneList(serveHttp_multiplePorts_servers)) {
    pcall { httpd.stop(); }
    serveHttp_multiplePorts_servers.remove(httpd);
  }
}

Author comment

Began life as a copy of #1001648

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011858
Snippet name: serveHttp_multiplePorts
Eternal ID of this version: #1011858/1
Text MD5: 3fd5a5e0a015e8656ca5d95ee22d289c
Author: stefan
Category: javax / networking
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-08 03:59:05
Source code size: 483 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 437
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1013354 - serveHttpWithWebsockets_multiplePorts