home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 June
/
PCWorld_2007-06_cd.bin
/
multimedia
/
ppsee
/
PPSeeSetup.exe
/
lib
/
bsh-commands-2.0b4.jar
/
bsh
/
commands
/
server.bsh
< prev
next >
Wrap
Text File
|
2005-05-23
|
441b
|
16 lines
/**
Create a remote BeanShell listener service attached to
the current interpreter, listening on the specified port.
*/
import bsh.util.Httpd;
import bsh.util.Sessiond;
bsh.help.server = "usage: server(int port)";
void server(int port ) {
new Thread( new Httpd( port ) ).start();
print("Httpd started on port: "+port);
new Thread( new Sessiond( global.namespace, port+1 ) ).start();
print("Sessiond started on port: "+ (port+1));
}