You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
countClosed = 0
pool = XAsyncSocketsPool()
srvAddr = ('192.168.0.190', 8090)
for i in range(1) :
cli = XAsyncTCPClient.Create(pool, srvAddr,5,4096,4096,False)
if cli :
print("Client %s created" % (i+1))
cli.OnFailsToConnect = _onTCPClientFailsToConnect
cli.OnConnected = _onTCPClientConnected
cli.OnClosed = _onTCPClientClosed
else :
print("Error to create client %s..." % (i+1))
pool.AsyncWaitEvents(threadsCount=1)
time.sleep(7)
pool.StopWaitEvents()
Program output:
Client 1 created
On TCP Client Connected
On TCP Client Data Sent (test)
When I send a message to it, the program outputs: 1) On TCP Client Closed (error)
How should I configure to receive information circularly, and whether there is automatic reconnection function
Looking forward to your reply, thank you
The text was updated successfully, but these errors were encountered:
I modified it(tcpCli.py):
Program output:
When I send a message to it, the program outputs:
1) On TCP Client Closed (error)
How should I configure to receive information circularly, and whether there is automatic reconnection function
Looking forward to your reply, thank you
The text was updated successfully, but these errors were encountered: