netclient
netclient.py interface to client tcp socket with - sr() send/receive a command
Created on Sun Jan 8 12:36:38 2017
@author: pgm
- class Netclient[source]
Bases:
object
connects and holds open a socket to defined port.
- Parameters:
addr (str) – ip-address or dns name on network
port (int) – server port number.
- trace = 0
- connect_timeout = 0
- receive_message(termex, maxlen=4096)[source]
Read the information from the socket line at a time.
- Parameters:
termex (str) – regex defines line terminator
maxlen (int) – max read size
- Returns:
string representing message
- instances = []