![]() |
OpenMash Documentations | Class Index | Method Index | Class Hierarchy |
TCL CLASS
ASCP/Client
Abstraction for client side of ASCP protocol. Typically, you create an instance of this class and call "request start" to initiate a service. In some cases, you may want to intercept various stage of the ASCP protocol. To do so, you add various hooks to ASCP/Client so that they will be called when certain events happen. e.g. "on_recv_offer", "on_alive". An ASCP/client object can only launch one service.
precond_, service_, alive_timer_, sev_loc_, request_timer_
Precondition for the requested service.
A soft-state that remembers we are being served by a service.
A Mash/Timer object that sends out alive message periodically.
Service location for the requested service.
A Mash/Timer object that sends out request message periodically.
init, destroy, agent_type, service_location, , request, alive, , on_service_expire, on_destroy, on_timeout, on_alive, on_event, timeout, relaunch, , launch_now, launch, precondition, process_packet, service_expire, service_instance, served_by, service_type
ASCP/Client public init { spec bw srv_loc precond }
Initialize various members.
bw
maximum bandwidth of the control session
srv_loc
where to find the service.
precondition
precondition which service providers have to pass before launching service.
spec
addr/port specification of the active service control session.
ASCP/Client instproc destroy { }
Clean-up timers and soft-state.
ASCP/Client public agent_type { }
Return the type of this agent: (c)lient/(s)ervice/(m)anager.
ASCP/Client public service_location { }
Return the service location.
Return the precondition, or set the precondition to the given args.
ASCP/Client public request { option args }
"request start" starts the periodic timer that sends a request message. "request stop" stop the timer.
ASCP/Client private alive { option }
"alive start" starts the periodic timer that sends an alive message. "alive stop" stop the timer. "alive pending" checks if a timer exists.
Handle a packet received by the protocol. This method (or methods that it calls) MUST free $packet when done.
ASCP/Client public on_service_expire { option callback }
ASCP/Client public on_destroy { option callback }
ASCP/Client public on_timeout { option callback }
ASCP/Client public on_alive { option callback }
Define callbacks when events happen.
ASCP/Client private on_event { type option callback }
Private method that manages the callbacks
ASCP/Client public timeout { }
Call on_timeout callback_, if defined. Default is not to do anything
ASCP/Client public relaunch { {option \" \" } }
ASCP/Client public launch_now { option args }
"launch start" starts the periodic timer that sends a launch message. "launch stop" stop the timer.
ASCP/Client public launch { option args }
"launch start" starts the periodic timer that sends a launch message. "launch stop" stop the timer.
ASCP/Client public precondition { args }
ASCP/Client public process_packet { addr packet }
ASCP/Client public service_expire { }
ASCP/Client public service_instance { }
ASCP/Client public served_by { }
ASCP/Client public service_type { }
version, send_announcement, bye, agent_id, args, ssg_port, recv_announcement, del_agent, error, bandwidth, as_args, register, unregister, control_port, add_timer, del_timer, timers, start, stop, announce, recv, timer, get_timer, set_announcement, get_announcement, ttl
tcl/indiva/lib/ascp-client.tcl
Generated on Mon Apr 12 04:04:16 PDT 2004