mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-21 06:03:50 +00:00
improve exc handling and tests
This commit is contained in:
parent
91389a9c5b
commit
11eab418ed
4 changed files with 35 additions and 15 deletions
|
|
@ -26,8 +26,7 @@ class TCPClient:
|
|||
def __init__(self, timeout=3):
|
||||
"""!Create a new instance
|
||||
|
||||
Create a new instance of an TCP Client.
|
||||
And set the timeout"""
|
||||
@param timeout: timout for the client in sec. (3)"""
|
||||
try:
|
||||
self._sock = None
|
||||
self._timeout = timeout
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@ class TCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
|
|||
"""!TCP server class"""
|
||||
|
||||
def __init__(self, timeout=3):
|
||||
"""!Create a new instance"""
|
||||
"""!Create a new instance
|
||||
|
||||
@param timeout: timeout for the server in sec. (3)"""
|
||||
self._server = None
|
||||
self._server_thread = None
|
||||
self._timeout = timeout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue