NowTCP Documention¶
Documention for the NowTCP Repository
Base Information you need to know¶
NowTCP Module: - IPv4 (Variable) - TCP (Class)
TCP Class:
- sock (socket.socket, variable)
- conn_at (host:port, variable)
- connections (all connections, variable)
- host (variable)
- port (variable)
- onConnection (Event: onConnection, variable)
- QueueSize (Socket listening queue size, variable)
- type (server or client, variable)
- StopHandler (True==stop, variable)
- Server(self) (Start a TCP server, Function)
- Client(self, handler=None, onStartup=None) (Start a TCP client, Function)
- GetData(self, conn=None, buffer:int=1024) (Get/Recv data from connection by buffer-size, Function)
- onData(self, value:str, func) (Run Function when receiving specific string value from the server (Currectly available only at the server-basic-handler, client later), Function)
- send(self, data:str, conn=None, DataType:str=’string’) (Send string/bytes data to the server/client, Function)
- close(self) (Close the connection for server/client, Function)
- BasicConnectionHandler(self, conn) (Basic Connection Handler for server connection(conn), Function)
- ConnectionHandler(self, conn, func) (Custom(func) Connection Handler for server connection(conn), Function)