Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
ThreadingMixIn Class Reference
Inheritance diagram for ThreadingMixIn:
ThreadingTCPServer ThreadingUDPServer ThreadingUnixDatagramServer ThreadingUnixStreamServer

Public Member Functions

def process_request_thread
 
def process_request
 

Detailed Description

Mix-in class to handle each request in a new thread.

Definition at line 448 of file SocketServer.py.

Member Function Documentation

def process_request (   self,
  request,
  client_address 
)
Start a new thread to process the request.

Definition at line 464 of file SocketServer.py.

References ThreadingMixIn.process_request_thread().

465  def process_request(self, request, client_address):
466  """Start a new thread to process the request."""
467  import threading
468  t = threading.Thread(target = self.process_request_thread,
469  args = (request, client_address))
470  t.start()
471 
def process_request_thread (   self,
  request,
  client_address 
)
Same as in BaseServer but as a thread.

In addition, exception handling is done here.

Definition at line 451 of file SocketServer.py.

References BaseServer.close_request(), TCPServer.close_request(), UDPServer.close_request(), BaseServer.finish_request(), OpenerDirector.handle_error, and BaseServer.handle_error().

452  def process_request_thread(self, request, client_address):
453  """Same as in BaseServer but as a thread.
454 
455  In addition, exception handling is done here.
456 
457  """
458  try:
459  self.finish_request(request, client_address)
460  self.close_request(request)
461  except:
462  self.handle_error(request, client_address)
463  self.close_request(request)

The documentation for this class was generated from the following file: