Python module which simplifies the task of writing network servers.
Questions tagged [socketserver]
385 questions
3
votes
2 answers
Python SocketServer.BaseRequestHandler wont communicate to remote requests
I've been developing Python server using SocketServer.TCPServer and SocketServer.BaseRequestHandler base classes. I'm using host "localhost" and port 2304 (not used by any other program).
The problem is that my server wont respond to remote request.…

StjepanV
- 167
- 2
- 14
3
votes
3 answers
Regarding handling more than 1024 socket descriptors
I have written a chat server using C on Linux. I have tested the same and it works fine with respect to performance. The only thing which lags is that I am using select system call for handling of sockets descriptors. Since select has the limit of…

user1457812
- 31
- 1
- 3
2
votes
1 answer
Flash client c++ server connection reset by peer
We have application that involves C++ socket server, Flash client that communicates with C++ server and Python socket server that gives crossdomain.xml to Flash client.
C++ server calls REST operations and return the results the the Flash client.…

gsone
- 1,188
- 8
- 25
2
votes
2 answers
Stop UDP SocketServer
I'm creating an UDP SocketServer, and I would like to shutdown if I'm receiving a close message from the client side than I would like to close the UDP connection.
As I received the message the Begin will be displayed, but the Finished is not…

Kicsi Mano
- 3,551
- 3
- 21
- 26
2
votes
2 answers
Making a publicly available TCPServer from behind a router
python 2.7.2
windows 7 32 bit
Let me preface this question with I'm fairly new to network programming. I've created a simple server and client using python's builtin SocketServer
SocketServer.ThreadingTCPServer((host, port), Handler)
This works…

user2682863
- 3,097
- 1
- 24
- 38
2
votes
3 answers
How to deliver instance of object to instance of SocketServer.BaseRequestHandler?
This is problem.
My primary work is : deliver "s" object to "handle" method in TestRequestHandler class.
My first step was : deliver "s" object through "point" method to TestServer class, but here im stuck. How to deliver "s" object to…
Ozymet
2
votes
1 answer
Python 'socketserver' only ever handles the first request
Client Output
To show the problem, here is the code in action when running on the client. As can be seen the first command succeeds (it always does) and it succeeds even in case of a faulty command by which it will return stderr.
Pwny…

mustang-g40
- 23
- 3
2
votes
1 answer
Python's Socketserver to Telnet errors
I'm writing a tiny server and client kind of for fun and learn how to use sockets, and how to do some simple networking. It uses the Telnet 'protocol' to ask the server for my username, and then I enter my password. The server complains when it…

Nick
- 55
- 5
2
votes
1 answer
Parameter specified as non-null is null.SocketService
my codes:
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int
{
if (!this.isRunning)
{
this.isRunning = true
this.backgroundThread?.start()
}
return…

user14679965
- 41
- 4
2
votes
2 answers
Run Python script on button click
I don't have much knowledge with web development so I want to make this very basic. I have a python project with a very simple website that has two text fields and a "submit" button. When the button is pressed I want it to run the python program…

person1234568475
- 85
- 1
- 7
2
votes
1 answer
ModuleNotFoundError: No module named 'SocketServer'
Am using python 3.7.4 i have import socketserver in all lowercase but still am getting error
from flask import Flask,flash,redirect,render_template,request,sessions,abort
import socketserver
app = Flask(__name__)
@app.route("/")
def hello():
…

Anand
- 41
- 1
- 3
2
votes
0 answers
socketserver listening on multiple ports
I am trying to write a TCP server in Python 3.6.7 using socketserver, that listens on two ports on the same IP address. This is what I came up with up to now:
import socketserver
class TCPServer(socketserver.StreamRequestHandler):
def…

charlie80
- 806
- 1
- 7
- 17
2
votes
0 answers
How PHP socket server to accept connection and communication with multiple clients (android)
I have a PHP socket server who needs to communicate with multiple clients. I know if(socket_listen($sock, 5) listens for 5 clients. But when I try to connect 2nd device it doesn't connect, it's like a connection with the first device blocking other…

Andry Jhonas
- 379
- 2
- 13
2
votes
0 answers
Modbus Server with umodbus
I am creating a Modbus Server using umodbus python module.
Two clients are connecting to the server. One is reading the registers and other one is writing the same registers after every 5 seconds. Now problem is that both the clients are not able to…

Hsn
- 1,168
- 2
- 16
- 39
2
votes
1 answer
How to write on web server in java
HI I am having problem in java related to write on the web server from the client. I am using following code please help me where I am wrong
For Server class
import java.net.ServerSocket;
import java.net.Socket;
import java.io.InputStream;
import…

agarwal_achhnera
- 2,582
- 9
- 55
- 84