DennisR@dair.com
1-650-494-7081 (main tel)
1-855-324-7835 (toll free)
HomeDownloadHelpAbout
    
tags: noc_net, network, toolkit  

About the wwwob and htob (ht_obj)

Overview

A session consists of 1 or more message exchanges. Sessions are restarted every midnight so unless rebooted later in day, a session spans all the messages for the day so far. A message exchange involves the client computer sending an http protocol request to the server for a web page. The server responds and completes the exchange. The client may (and often does) send a new http protocol request to initiate another exchange.

The wwwob is a Python session object. It contains values which are true for the session. Further, the wwwob is cumulative. Changes to it persist from message to message across the entire session. The htob (and underlyint ht_obj) are message objects.

DAIRGram defines all requests coming frm the same IPV4 (IP) address as belonging to the same session. This is inferior in some regards to more traditional cookie-based approaches. It is superior in allowing the request to proceed immediately without need to spend a message exchange initializing the cookie.

wwwob

  • wwwob.eval_proto(html) expand out basic html and enclose it with a built-in wrapper. That wrapper is located in the dairgram.py module and may be edited in the source code. It is also modifiable at run time with the wwwob object methods mod_head_content, mod_boy_top, mod_body_menu, mod_body_mid, mod_body_bot_links, and html_wrap.
  • wwwob.htob the current message htob object
  • wwwob.pci_frame(file_name, caption, align="right", valign="middle", maxwidth=400) wraps the picture at file_name in a floating table.
  • wwwob.htob the current message htob object

htob

  • htob.std_header(tx, head_addin="", alt_nav="", click_disable=0, nav_addin="", bottom_row="", cust_logo_code="", shade_0="", body_line="", set_width="100%", ) provides standard head and body pramble
  • htob.std_footer(tx, post_addin="") provides standard closure of head and body pramble

Additionally, the following selected from the ht_obj are provided and have the same semantics. See the http_obj.py module for definition.

  • ht_obj.calling_line
  • ht_obj.port
  • ht_obj.baseport
  • ht_obj.rq_method
  • ht_obj.SockToUse
  • ht_obj.rmt_ip
  • ht_obj.rmt_port
  • ht_obj.serial
  • ht_obj.trace(ev_name):
  • ht_obj.trc_print():
  • ht_obj.show_trace_table()
  • ht_obj.dump_longest():
  • ht_obj.param(parmkey, default="")
  • ht_obj.dict_of_params()
  • ht_obj.params_as_list()
  • ht_obj.get_http_header(hdr_name)