Questions tagged [Sockets] (519)

2
answers

How to handle large number of simultaneous connections to the server?

How to handle large number of simultaneous connections to the server(in Python)? (which of the options are correct) 1)Create a separate thread for each new connection 2)Processes and threads is not necessary, python will automatically handle all the connections 3)Create a separate process for each connection 4)create a proc...
Archibald.Wiso asked April 19th 20 at 12:21
1
answer

As on the client using a broadcast request to find the server (Winsock)?

There is a server on the PC, then start the client (All UDP). How to make a network broadcast to find the server to get its ip (well, there is 127.0.0.1 and in any case I think) and the port to fill the structure : RecvAddr.sin_family was = AF_INET; RecvAddr.sin_port = htons(Port); RecvAddr.sin_addr.s_addr = inet_addr("127....
Madeline_Rosenba asked April 19th 20 at 12:19
3
answers

How to send via socket the audio file?

Have the following working code: def main(): print(MY_LOCAL_IP) server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_socket.bind((MY_LOCAL_IP, 5000)) server_socket.listen() while True: client_socket, client_addr = server_socket.acc...
Helen49 asked April 18th 20 at 13:11
1
answer

Pitfalls in the development of chat. How to solve?

Write chat with node+socket.io. Writing for the first time. All manuals superficially describes the principle of message passing, but getting to implementation, I was faced with a few questions. Below the issues and solutions that came to my mind. A little bit about how I organized everything: The user is authenticated ...
Marlene.Raynor asked April 16th 20 at 09:58
3
answers

What are the terms and themes found in the development of the network engine for the game?

The crux of the matter in two lines. Good evening Habr, without much of a greeting. I am 14 years old and that means I haven't studied at University. But still try to help on the request below. So, I develop(write the first 25 lines) network engine(server to whatever you like) for such a popular game like Minecraft Bedrock....
Jaycee.OHara asked April 9th 20 at 10:25
1
answer

Making the socket to throw POLLOUT select.poll?

The backgroundI decided to write a non-blocking micro-server on esp32 (limited resources) using microPython, but the special role it plays as API socket's there +/- the same as in CPython. Good day! A. In the sockets I'm new, so I'm not exactly clear under what circumstances the socket throws in the select statement.poll e...
karina.Cummera asked April 9th 20 at 10:00
0
answer

How to collect the packets for transmission on the network? How best to encode?

How to collect packages? Yes, he just learning, so here is the question for the Assembly of such a byte sausages, some ready-made module or is it better to write your flexible encoder? If there are options not to invent a Bicycle it would be nice used the struct module, but was wondering how to then on the server or client ...
1
answer

Correct usage poll recv?

Last time the answers community has helped me a lot, again thank you very much. The program work in local network and via the Internet. I have a new question. Here I create a socket connection, accept'om get a pair socket and can here and there batiki to throw. Then do a poll, waiting for data. Then in a loop read data wit...
tressa_Upton asked April 8th 20 at 18:23
0
answer

How to change the code to the server at the same time read the packets and send data to be entered?

How to change the code to the server at the same time read the packets and send data to be entered ? import socket from threading import * serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = "Localhost" port = 8000 print (host) print (port) serversocket.bind((host, port)) class client(Thread): def __...
jayde asked April 8th 20 at 17:51
1
answer

How to create a socket server?

I want to write a single socket server for vzaimodeystviya between the 3 sites php and mobile app under Android. You can write a java application, php, python, even something in c/c++ with sockets but never has the case had not. I poked at harbe. Bunch of articles but none does not inspire confidence.. some negative comment...
Pinkie.Borer asked April 8th 20 at 10:05