PageRenderTime 36ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-0-pre5/bsh/commands/server.bsh

#
Unknown | 11 lines | 9 code | 2 blank | 0 comment | 0 complexity | f87a5e970eed0c4f91451e0ca0e4272f MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. import bsh.util.Httpd;
  2. import bsh.util.Sessiond;
  3. bsh.help.server = "usage: server(int port)";
  4. server(int port ) {
  5. new Thread( new Httpd( port ) ).start();
  6. print("Httpd started on port: "+port);
  7. new Thread( new Sessiond( global.namespace, port+1 ) ).start();
  8. print("Sessiond started on port: "+ (port+1));
  9. }