PageRenderTime 97ms CodeModel.GetById 92ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre4/bsh/commands/server.bsh

#
Unknown | 15 lines | 13 code | 2 blank | 0 comment | 0 complexity | e64e8d3bf0c5a4da154a581db64664f4 MD5 | raw file
 1/**
 2	Create a remote BeanShell listener service attached to 
 3	the current interpreter, listening on the specified port.
 4*/
 5import bsh.util.Httpd;
 6import bsh.util.Sessiond;
 7
 8bsh.help.server = "usage: server(int port)";
 9
10void server(int port ) {
11	new Thread( new Httpd( port ) ).start();
12	print("Httpd started on port: "+port);
13	new Thread( new Sessiond( global.namespace, port+1 ) ).start();
14	print("Sessiond started on port: "+ (port+1));
15}