Linked Questions
10 questions linked to/from Python simple socket client/server using asyncio
0
votes
0
answers
35
views
How can i send socket asynchronously? [duplicate]
this is my code
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 8001))
message = json.dumps({
"wave-file": '/home/s41140/projects/...
7
votes
1
answer
7k
views
Simple Python TCP forking server using asyncio
What I'm trying to do
I'm trying to emulate the behavior of the following simple socat(1) command:
socat tcp-listen:SOME_PORT,fork,reuseaddr exec:'SOME_PROGRAM'
The above command creates a forking ...
0
votes
0
answers
6k
views
Attempting To Connect To a Website Returns "ConnectionResetError: [WinError 64] The specified network name is no longer available"
I am trying to connect to the Discord API using raw sockets. To improve performance and concurrency, I've decided to use asyncio. However, it has been much less cooperative than the socket module by ...
3
votes
1
answer
3k
views
asyncio with multiple methods in micropython
When I run the following code, it runs and print ("Listening, connect your APP to http://192.168.4.1:8080/") and waiting request as web server. During the web server mode, I want the LED to blink that'...
2
votes
1
answer
3k
views
Asynchronous socket server with asyncio [duplicate]
I want to start an while loop that can only be cancelled when another socket command breaks that loop. I've tried using asyncio but the server doesn't accept incoming messages until the while loop ...
1
vote
2
answers
1k
views
Replace 'While-True'-Loop with something more efficient
Problem
It's very common for beginners to solve IO waiting while concurrent processing in an similar way like here:
#!/usr/bin/env python3
"""Loop example."""
from time ...
1
vote
2
answers
2k
views
How would I open and run a python program on a raspberry pi from a main python program on a windows pc?
I am running a main python program on a Windows PC that is hooked to equipment that cannot be ran on an Raspberry pi. At a certain point in the main program, I want to call/execute a Rpi program to ...
0
votes
1
answer
899
views
Python sockets server and client in one script
I have a seemingly simple task that I can't quite wrap my brains around.
Here is what I need to do. Using socket module, start a server, use a client to start a connection, stop the server, return ...
0
votes
0
answers
309
views
Problem in connecting two different devices using sockets in Python
I want to connect my two different devices using sockets library in Python. Both my devices are connected to the same Internet connection. I tried to use the sockets library to establish the ...
0
votes
0
answers
102
views
In python 3, is it possible to convert this client-server threaded code to client-server asyncio code?
I have a simple client server routine that uses threading which I am trying to convert to asyncio as an exercise for learning asyncio:
# This threading code works as expected (see asyncio code below ...