Python module which simplifies the task of writing network servers.
Questions tagged [socketserver]
385 questions
0
votes
0 answers
socketserver change port in runtime?
Is it possible to change the port (in this case change from "1111") after everything has been set up on the server side?
import socketserver
class ServerHandler(socketserver.BaseRequestHandler):
def handle(self):
while True:
…

Mike Porter
- 53
- 4
0
votes
1 answer
Python 3.7.7 SSL socketserver ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
I wrote down a simple client-server application in python on a win10 system. I'm using Python 3.7.7.
When the client connect to the server, I receive the following error:
Sending data
Traceback (most recent call last):
File "Client.py", line 23,…

Stefano
- 11
- 2
0
votes
0 answers
Why can't i connect two sockets using socket programming in python?
I have written code using sockets in python in two devices , one is programmed with client code(desktop) and another one is server code (laptop) both are connected over wifi , in client code i have given server ip address with port number, any…
0
votes
1 answer
Reading all waiting lines in a SocketServer handler
This is a simple socketserver example that should receive a line over UDP and echo it out:
import socketserver
class LineHandler(socketserver.DatagramRequestHandler):
def handle(self):
line = self.rfile.readline().strip()
…

rgov
- 3,516
- 1
- 31
- 51
0
votes
0 answers
Sending data through TCP socket not working. Error: No Error
I am writing a client-server c++ program where a user-specified number of clients (ESP32 boards) communicate with a server by sending sniffed packets. For semplicity let's assume only 1 client. After establishing a connection, the client sends the…

Federico
- 1
- 1
0
votes
1 answer
AttributeError: 'list' object attribute 'index' is read-only
I am new in python programing. I try to connect tensorflow with MT4 data. I use a working solution to transfer data but have some problet to add it to tensorflow. I try to use the basic timeseries prediction.
def train_test_model(msg=''):
msg =…

Beertje
- 23
- 1
- 5
0
votes
1 answer
python baserequesthandler client address is real established ip?
i have a question for you
I'm using the udp socket server using baserequesthandler on python
I want to protect the server against spoofing - source address changes.
Does client_address is the actual ip address of established to server ?
If not, how…

Murat Budak
- 11
- 1
0
votes
1 answer
Socket IO listener not working in Android
I am working on the notification of an Android TV. I have implemented it using the Socket IO server connection. I have established a connection with Socket Server using java.net.Socket but I am not able to listen to the sent messages from the…

Machhi Sudke
- 31
- 5
0
votes
1 answer
How to send data between two clients
I am making a simple game with multiplayer mode in it. I need to somehow send data between one player and other. I can't find a way to transfer data between two clients. Is there a way to forward them through the server?
I'm using the socketserver…

Сергей Жук
- 19
- 5
0
votes
2 answers
Python logging port 514 folder/yyyy/mm/dd
Hi i want to log 514 udp port with python script. Log address does not change when date changes.I want to save all log diary. I want to record the log with the same name in different folder every day.
#!/usr/bin/env python
import os, stat
import…

Erdem Çetin
- 491
- 1
- 5
- 21
0
votes
1 answer
My if & elif not working on sockets (python 3)
I tried to create a server that receives commands from the client
And to identify which command the client wrote I used if & elif
But when I run the program and write a command from the client, only the first command works (the command on the if)…

Mag
- 1
0
votes
2 answers
How do I add a list of programs currently running on java socket server?
I have set up a Java socket server. I want the client to be able to input "Running Processes" which will cause the server to print all of the programs running on the server. The server code looks like this:
// Java implementation of Server…

Collin Bray
- 1
- 2
0
votes
0 answers
TCP SocketServer only accepts connections without AF_INET and SOCK_DGRAM passed into client
I am setting up a basic TCP server for receiving local connections. I already have client applications with sockets constructed in the following way sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM). I need the client to be able to connect…

maxopie
- 21
- 4
0
votes
2 answers
How to make a multi-client chat room with python socketserver.TCPServer
I have to make a multi-client chat room with TCPServer provided by serversocket module in Python. How do i make this into a multi-client server and send the message to all other client?
I have try to modify the existing code from the…

HollowLord
- 11
- 5
0
votes
2 answers
How to implement sending messages to some user not to all sockets
How to send message instead to all clients in room, to specific user in default room based on username or id. Where I need to implement that, only on server site or? I know I am doing wrong and I am confused.
var numUsers = 0;
io.on('connection',…

Andry Jhonas
- 379
- 2
- 13