I want to call sendMessage method from outside of MyServerProtocol class and send a message to the server. The answare is very similar to this but i need to use asyncio instead of twisted.
Cane someone suggest me a solution? An example derived from this would also be appreciated Thanks.
The
call_soon_threadsafe
function of event loop is meant for this.And then from the other thread simply invoke