-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop async Server #84
Comments
I needed the ability to stop the server also. Thank you, Loris1123. Your solution works for me as well. I agree that it would be nice to have this incorporated into pymodbus. |
* New helper function to help stop Asynchronous server are being added. Calling this helper function will kill the main thread * #84: Removing redundant parameters to method _is_main_thread * #84: Fixed loggers * #84: Retaining one generic StopServer command that will cater to both TCP and Seriel Server * #84 Add docuementation to StopServer helper function
* New helper function to help stop Asynchronous server are being added. Calling this helper function will kill the main thread * pymodbus-dev#84: Removing redundant parameters to method _is_main_thread * pymodbus-dev#84: Fixed loggers * pymodbus-dev#84: Retaining one generic StopServer command that will cater to both TCP and Seriel Server * pymodbus-dev#84 Add docuementation to StopServer helper function
* New helper function to help stop Asynchronous server are being added. Calling this helper function will kill the main thread * #84: Removing redundant parameters to method _is_main_thread * #84: Fixed loggers * #84: Retaining one generic StopServer command that will cater to both TCP and Seriel Server * #84 Add docuementation to StopServer helper function
Hello, I have a question if I have a button that stops the server with the Stopserver () function, how can I start it again without closing the program? I need to update the IP address |
The |
Thanks for your answer dhoomakethu, I have to implement a method able to change the IP address of the server, without closing the main program. Initially try to stop the server and start it again with the StarTcpServer method with a new Ip address, but when you stop the reactor and start it again, an error appears. Any recommendation?. |
@MM8704 could you share the error and any code to reproduce your use case? |
@dhoomakethu sure, is a small example of a server mounted on kivy Please download it in google drive: |
Thanks, I will take a look.Meanwhile, have a look at [modbus-simulator](https://github.com/riptideio/modbus-simulator. It is also based on pymodbus and kivy supports both TCP and Serial servers (uses pymodbus sync server and threads though). You can find the backend code here |
Hi @dhoomakethu, without any positive, have you found something? |
@MM8704 sorry but your code throws me error while running |
@dhoomakethu I tried to execute the code that you mentioned but I could not (the launcher file does not really know how to execute it), I just read the code to implement it in my program ... without results. |
I didn't find a way to stop an async TCP Server. I need this to test the server with different configuration in a single script.
To stop the async server I added the following code to async.py:
It seems like it is working for me. Maybe you should include something similar to pymodbus.
The text was updated successfully, but these errors were encountered: