ServerPortfolio  2.0
Python parsers and server
 All Classes Namespaces Files Functions Variables Properties Pages
Classes | Functions | Variables
serverportfolio.SocketServer_Server Namespace Reference

Server of the application, wait for requests: provide data, force update, etc. More...

Classes

class  MyThreaded_TCPServer_Parser
 The thread Server. More...
 
class  MyHandler_Parser
 Make a proper handler class to respond to the message. More...
 

Functions

def run_MyServer
 Function to initialize and run the server. More...
 

Variables

tuple logger = logging.getLogger('SP')
 
tuple main_logger = logging.getLogger("SP.main")
 
 host = HOST
 not needed, may be useful for debugging if already one running just need to change here, default from Global More...
 
 port = PORT
 
tuple address = ( host, port )
 
tuple dict_stocks = DictionaryStocks( load_all_stocks=True )
 
tuple start = time.time()
 liststocks=(list_stocks,list_stocks_open) More...
 
tuple server_thread
 

Detailed Description

Server of the application, wait for requests: provide data, force update, etc.

Last Changed

Id:
SocketServer_Server.py 9 2015-04-02 23:27:25Z michael

Function Documentation

def serverportfolio.SocketServer_Server.run_MyServer (   host = HOST,
  port = PORT,
  thq = None 
)

Function to initialize and run the server.

Can be called by the main thread ( normal behaviour )
or as a separate thread like in this main

server run until class variable MyThreaded_TCPServer_Parser._server_running is True.

Parameters
host,porthostname and port of the server
thqqueue associated

Definition at line 362 of file SocketServer_Server.py.

Variable Documentation

tuple serverportfolio.SocketServer_Server.address = ( host, port )

Definition at line 405 of file SocketServer_Server.py.

tuple serverportfolio.SocketServer_Server.dict_stocks = DictionaryStocks( load_all_stocks=True )

Definition at line 408 of file SocketServer_Server.py.

serverportfolio.SocketServer_Server.host = HOST

not needed, may be useful for debugging if already one running just need to change here, default from Global

Definition at line 402 of file SocketServer_Server.py.

tuple serverportfolio.SocketServer_Server.logger = logging.getLogger('SP')

Definition at line 397 of file SocketServer_Server.py.

tuple serverportfolio.SocketServer_Server.main_logger = logging.getLogger("SP.main")

Definition at line 398 of file SocketServer_Server.py.

serverportfolio.SocketServer_Server.port = PORT

Definition at line 403 of file SocketServer_Server.py.

tuple serverportfolio.SocketServer_Server.server_thread
Initial value:
1 = threading.Thread(target=run_MyServer, name="t-server",
2  args=(host,port) )

Definition at line 424 of file SocketServer_Server.py.

tuple serverportfolio.SocketServer_Server.start = time.time()

liststocks=(list_stocks,list_stocks_open)

Definition at line 414 of file SocketServer_Server.py.