Python module which simplifies the task of writing network servers.
Questions tagged [socketserver]
385 questions
1
vote
1 answer
Write a TCP Echo Program?
I am trying to write a TCP Echo program that should open a TCP server socket, accept at least 1 connection, and echo back any data received. At minimum, this program should launch and run on a specified port (exe: port 4444". Ideally, it would ask…

Zonxwedop
- 387
- 1
- 3
- 12
0
votes
1 answer
Which is better to use for the server of a basic server/client socket implementation, "socket" or "socketserver"?
I've read that socketserver is easier to use, but for someone who is just learning about sockets, which would be quicker and more beginner-friendly, socket or socketserver? For a very basic client/server setup using stream sockets. (Python)

Marty
- 5,926
- 9
- 53
- 91
0
votes
1 answer
How to send data to a client?
from BaseHTTPServer import HTTPServer
from CGIHTTPServer import CGIHTTPRequestHandler
import socket,ssl
import time
import Config
class StartHTTPServer:
'''Web server to serve out map image and provide cgi'''
def __init__(self):
…

Shuen
- 35
- 5
0
votes
1 answer
Is it bad Ju-ju that the port is still being listened to after my app shuts down?
My app listens on a certain port for socket messages. I can see that it is LISTENING via "netstat -a" at the command line.
When I shut the app down, the machine is still listening on that port when I re-run "netstat -a"
Is this a problem?
It seems…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
0
votes
3 answers
How can I use a SocketServer to start a communication with a Client in Java?
First, I am quite new with the use of Socket communication, so there still some things that I don’t know. I understand the basics of Socket communication in Java, so I seeking for guide here.
Now, about my problem, I will need to build a server…

ArsenioM
- 21
- 4
0
votes
1 answer
checking for disconnected clients in a list? in python
Okay so this is what I'm trying to do in my python socket server.
I'm trying to have a way for my server to send data. But if it finds a disconnected client in the list of address's that is be used. To remove it from the list. Also, I'm using UDP…

Shane O
- 85
- 2
- 10
0
votes
0 answers
Create python TcpSocketServer from existing socket
Suppose I have an existing socket, say that is passed in as a file descriptor from systemd socket activation. How would I use the socketserver module to create a socketserver.TcpServer or socketserver.UnixStreamServer that utilizes the existing…

Thayne
- 6,619
- 2
- 42
- 67
0
votes
0 answers
why is creating multiple databases when I interact with socket.server?
I've created socket server in one .py file
I've created socket client into an another .py file
I've created a demo database into an another .py file
I want that client verify a social number from database thru server and now the party begins..
1st…

alender
- 13
- 4
0
votes
0 answers
with pyinstaller compiled exe http-server is not working/opening a port
I got a simple http server which should only serve one request. In the hole Project it is for an IOT Device which gets it new Firmware via the http server.
When I execute the script withing PyCharm, everything works as expected. After I compiled it…

Philipp
- 1
- 1
0
votes
1 answer
Send GET request from Spring Boot to Java ServerSocket
I need to communicate between a Spring Boot application and a Java ServeSocket. I have I created the Java ServerSocket and the Spring Boot.
Java ServerSocket has a BufferedReader as an input and OutputStream as a response.
I have just 2…
user20879521
0
votes
0 answers
errno 32 broken pipe while using a sendall
I am trying to make a client-server program. I have a client, a server, and a class that handle the connection and the send and receive the messages from the server(client_connect).
This is my client:
from client_connect import *
HOST =…

Duarte GV
- 17
- 4
0
votes
0 answers
why does my python server not run in a "with" block?
I am writing a simple UDP Server that runs in a thread, based on this information
The code sending requests to the server is not shown for simplicity. Anyway, the following code does not work (requests do not seem to be…

danmcb
- 289
- 1
- 12
0
votes
0 answers
Failed connection UDP Server C# . Socket exception 10060
I´m trying to make a UDP server in c# ussing Microsoft Visual Studio. Few days ago, I connected properly the client and the server, and I have been able to read and process the received data. However, I modify to add a new socket couple to the UDP…

nachettt
- 1
0
votes
1 answer
Python UDP socketserver returning empty message
I have a UDP socketserver program that I use to demonstrate how UDP works (code for the server and client are below). I run this on a server, then have the client.py program send a message and receive a reply. I am unfortunately running into an…

Ryan
- 888
- 1
- 11
- 29
0
votes
0 answers
Which TCP socket errors are non-recoverable and client/socket must be dropped by the server?
I wrote a simple TCP server. Right now I just swallow all exceptions in try/catch block for ClientAccept or Socket's Accept. Both of these throw either IOException or SocketException and the later redirects to Win32 Socket Errors Codes for more…

KreonZZ
- 175
- 2
- 10