[ class tree: Net_Server ] [ index: Net_Server ] [ all elements ]

File: remoteConsole.php

Source Location: /Net_Server-1.0.3/Net/Server/Driver/Multiprocess/remoteConsole.php

Page Details:


This is a base class for a TCP based console listener; it manages by itself the standard console operations:

  • help: generated from the options list given at console creation;
  • quit: exit from the console;
  • shutdown: request for server shutdown; close the listener itself and
calls (if exists) the class method shutdownActionPerformed().

In order to use the class you must write your own class that extends remoteConsole; into your constructor you must call the superclass constructor passing as args at least an array of options that the console will support, the application name (a random string if you've no idea...) and socket data (address & port to bind); other options are avaible, see API for details. Then you must implement into your class a method for each avaible option; this method must have a name with the syntax: [choice]actionPerformed When a client choose the option [choice], this method will be executed (if exists), and return string is sent back to the client

(for example, if you have a menu like L -> list files in current dir and you have defined the method LactionPerformed() this method will be called)

[ Top ]

Documentation generated on Mon, 11 Mar 2019 15:47:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.