eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SunRPC::RPCServer':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RPCServer (in SunRPC)


Inheritance:

   Object
   |
   +--SunRPC::RPCEndPoint
      |
      +--SunRPC::RPCServer
         |
         +--SmalltalkShareServer
         |
         +--SunRPC::DemoServer
         |
         +--SunRPC::MountServer
         |
         +--SunRPC::NFSServer
         |
         +--SunRPC::PortMapperServer

Package:
stx:goodies/communication
Category:
Net-Communication-SunRPC
Version:
rev: 1.52 date: 2019/07/11 13:38:54
user: cg
file: SunRPC_RPCServer.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Gittinger

Description:


abstract superclass for RPC server programs.
See MountServer, NFSServer and DemoServer for concrete examples.


Class protocol:

accessing
o  addToServersRunning: aServer

o  removeFromServersRunning: aServer

o  serversRunning

debugging
o  debug: aBoolean
self debug:true
self debug:false

o  dumpBytes: aByteArray
self dumpBytes:#[]
self dumpBytes:#[ 0 1 2 ]
self dumpBytes:#[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ]
self dumpBytes:#[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
self dumpBytes:#[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ]
self dumpBytes:#[ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 ]
self dumpBytes:#[ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 ]

o  logging: aBoolean
self logging:true
self logging:false

o  traceOp: aBoolean
self traceOp:true
self traceOp:false

o  verbose: aBoolean
self verbose:true
self verbose:false

initialization
o  initialize
Initialize class variables.

usage example(s):

     SunRPC::RPCServer initialize.

o  killAll

o  killAllRPCServers
self killAllRPCServers

o  serverRunning
SmalltalkShareServer serverRunning
RPCServer serverRunning

queries
o  isRPCServerClass

startup
o  isStartableWithMain
return true, if this is an application class,
which can be started via #main / #main:

o  main
Start a server

o  start
Start a server on its TCP port

usage example(s):

     MountServer start
     NFSServer start
     SmalltalkShareServer start

o  startServerIfNotYetRunningAtPort: portNr protocol: protocol

o  startUDP
Start a server on its UDP port

usage example(s):

     MountServer startUDP
     NFSServer startUDP
     SmalltalkShareServer startUDP


Instance protocol:

change & update
o  update: something with: aParameter from: changedObject
system is shutting down - unregister from portMapper

handle client
o  checkHost: hostName

o  checkHost: hostName askUser: askUser

o  confirmNewHost: hostName
A previously unauthorized host is trying to connect.
Ask the user if we can authorize this new host.

o  executeRequest: bytes
NFS has a bug here: even if registered with a different

o  handleClient: aSocket
This method is invoked when a new connection arrives (tcp),
or a packet was received (udp).
It checks the host (allow/deny), possibly asking via a Dialog,
then calls #handle*Client: to do the real work.

o  handleDatagramClient: aSocket
Called when a request arrives via udp;
Read the request, check for host being allowed and execute.

o  handleStreamClient: aSocket
Called when a good client request arrives via tcp;
Read the request and execute.

o  loopForever
Create and listen to my socket. When a connection arrives,
to handle the request (in #handleClient:).

o  performOperation: opName withArguments: argVector

o  readStreamDataFrom: aSocket
Read the request-data from a stream socket.

initialization
o  initialize

operations
o  null
ignored - void

queries
o  handlePriority

o  isRunning

o  operationNames

o  operations

o  portNumbers

o  program

o  programNumber

o  programVersion

o  protocol

o  version

shutdown
o  release
close

startup
o  registerInPortMapper
start a local mapper then

o  restart

o  serverPriority

o  startConnectProcess
Called when snapshot is started, and at instance creation.

o  startServer
This is only run by SERVER instances at startup.

o  unregisterInPortMapper


Examples:


Abstract - see DemoServer, MountServer and NFSServer for examples.

ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 18 Apr 2024 19:14:12 GMT