Newest 'socketserver' Questions - Stack Overflow

Questions tagged [socketserver]

Python module which simplifies the task of writing network servers.

0
votes
0answers
11 views

Send message from Socket server using Asynchronous Server Socket

I was going through MSDN example of Asynchronous server socket example and successfully able to create a demo application. Please find the link of the solution which i read https://docs.microsoft.com/...
0
votes
1answer
40 views

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 ...
1
vote
1answer
21 views

TCP Socket What is the “flow of events” when two nodes talk

Relating to my previous question here, Previous Question, let me try to ask my question in laymen's terms (As I understand things in order to ask my question). I am building a TCP client <--> ...
0
votes
0answers
16 views

Python socketserver.ThreadingTCPServer call server method from outside thread

I'm writing a web application (Flask), that contains a TCP server (ThreadingTCPServer) which receives remote connections from clients. I am trying to prompt the clients to respond with a status ...
0
votes
2answers
38 views

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 ...
1
vote
1answer
26 views

Script hangs when receiving data from socket

This is my python script to receive data from client: import time import socket HOST = '' PORT = 8888 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) print('Socket created') try: s.bind((...
1
vote
0answers
59 views

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 ...
0
votes
0answers
19 views

How to convert Message to CharSequence to show the message from socket in notification?

I have Client-Server Socket that listen-push messages. Is there a way to get content from Message msg obj and put to setNotificationMessage() to show the message from server like notification message ...
0
votes
0answers
20 views

Identifying authentication from a curl request in proxy server

I have a multithreaded proxy server, which must have authentication for GET and POST requests. This is the code for the request handler I have written so far. PORT = 20100 class Proxy(...
1
vote
0answers
20 views

How to access to socket object from a different php file

I want to send something to my connected clients over another php script. But when I use the function "send", clientlist is null. Can you help me about this please? Socket.php: $clientlist = array();...
0
votes
0answers
14 views

socketserver not shutting down when calling server.shutdown() Python 3.7 Nosetests

We have a unittest which is set up in the following way. class ServerWrapper(object): """ A test helper which manages an instance of a RPC server. Can be used as a context manager, or ...
1
vote
0answers
121 views

share allocated memory buffer between c++ dynamic library and main C program

For work with C based socket server framework, we need to transfer data between socket server thread of C-based program and C++ based DLL. Operation system MacOs. Inside DLL everything works fine and ...
0
votes
0answers
50 views

GPS Tracking: SOCKET PROGRAMMING :

I am new to socket programming and the solution at GPS Socket communication (CONCOX) helped me to most of the extent. I have to track and capture all the data from all these 2500 vehicles. The ...
0
votes
0answers
57 views

Create my own Python3 Proxy using socketserver and http.server in EC2 machine

I am trying to follow this example and translating it to python3 in order to create a proxy server to be able to access some http webpages through it. I'm running my script in an AWS EC2 where I have ...
0
votes
0answers
28 views

Handling requests in python SocketServer

I have a code below that does the client-server communication properly. The client: # Client import socket import pickle class Model: def __init__(self, host, port): self.port = port ...
0
votes
1answer
98 views

How to read incomming messages using svSocket Server in R

I am using svSocket package in R to create a socket server. I have successfully created server using startSocketServer(...). I am able to connect my application to the server and send data from server ...
1
vote
1answer
75 views

Socket server in python refuses to connect

I am trying to create a simple web server with python using the following code. However, When I run this code, I face this error: ConnectionRefusedError: [WinError 10061] No connection could be ...
0
votes
0answers
23 views

Python Socket server closing the connection unexpectedly on congested network

I have a python2.7 Socketserver that is responding to requests over a congested local network. (Think cluster of computers running said python server talking to a single controller through a switch). ...
0
votes
1answer
196 views

Python SimpleHttpServer, how to return files without extensions with plain/text mime type?

I coded following simple http server in python, I have some files without an extension and want to serve them with "text/plain" mime type. How can I achieve it? import SimpleHTTPServer import ...
1
vote
0answers
83 views

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 ...
3
votes
0answers
75 views

Proper way to close socketserver client sockets

Would like to know if explicit action has to be taken in order to close communication sockets used by the socketserver module. I know that server_close() method exists, but as far as I'm aware, it's ...
0
votes
0answers
66 views

How to configure squid server to support icap error 503 (service overloaded)

I've got setup which contains the following devices: 1. file server 2. squid proxy server 3. clients 4. icap server. Client requests for download files from the file server will go through the ...
0
votes
0answers
28 views

How to pass additional arguments to ThreadingUDPServer instance - python

I went through this example , and I am struggling to pass additional arguments when a Server Instance of DatagramRequestHandler is created. Below is the code structure I have. Is it possible to pass ...
0
votes
1answer
84 views

I am trying to create an http2 multiclient server using python hyper library. It completes only the first request

I am able to serve http2 using this tutorial. https://python-hyper.org/projects/h2/en/stable/basic-usage.html. This version works fine. But this server is able to serve only one client in a time, ...
0
votes
1answer
24 views

JAVA Sockets getting called too many times

I am trying to implement an ServerSocket but i simply can not understand why code gets called 3 times if I close the connection. Here is my code: import java.io.IOException; import java.net....
0
votes
1answer
225 views

s.recv hang in python sockets

I have a client and server machine. From client I am sending a linux command which replies after 80 sec. As the server does not reply initial80 seconds the (s.recv) and a timeout error occurs. ...
0
votes
0answers
14 views

Python - How to send a proper HTTP respond message using socketserver?

I have an assignment where we are to create a static HTTP server and do some GET and POST operations. Right now I'm trying to send back the proper response to a GET request, but when I try to connect ...
0
votes
2answers
48 views

Client can only connect to server when on the same computer

I am trying to create a multiplayer java game and have decided to use a java socket server. The "client" is able to connect and communicate to the server flawlessly when they are both ran on my ...
0
votes
0answers
32 views

Java REST API to send and receive multiple String via socket server and get back the response from server

I am writhing a java socket API that is able to send sting to my socket server and get back the response from server. Below is my server code : package com.test.socket; import java.io.*; import ...
0
votes
0answers
32 views

WiFi-Direct : android studio SocketServer accept - connection refused

I can use a Samsung tablet running Lollipop 5.1 WiFI Direct to connect to a socket server running on a TI micro-controller(cc3220). But I can not set up the connection the other way. I keep getting ...
1
vote
1answer
1k views

How to send and receive webcam stream using tcp sockets in Python?

I am trying to recreate this project. What I have is a server (my computer), and a client (my raspberry pi). What I am doing differently than the original project is that I am trying to use a simple ...
0
votes
2answers
186 views

Java socket client to server on different network.

My question: How do I establish a connection from a client on one network to a server on another network in Java? Background: I created a simple client and server that communicate fine using ...
1
vote
2answers
79 views

modify a function of a class from another class

In pymodbus library in server.sync, SocketServer.BaseRequestHandler is used, and defines as follow: class ModbusBaseRequestHandler(socketserver.BaseRequestHandler): """ Implements the modbus server ...
0
votes
1answer
86 views

ValueError from socketserver on close event using PySide2

I found this answer the other day when trying to figure out a way to send data to an already running instance of PyQt and it works well but I was just messing around with PySide2 and tried the code ...
1
vote
1answer
211 views

Multithreaded TCP socket

I'm trying to create a threaded TCP socket server that can handle multiple socket request at a time. To test it, I launch several thread in the client side to see if my server can handle it. The ...
-1
votes
2answers
257 views

C program that connects to index.php on xampp server

I am looking to setup a C client that can communicate with an index.php file running on a local XAMPP server. All the tutorials online are based on creating a C client and connecting to a C server. ...
0
votes
1answer
217 views

read a response from socket server and save into database

I am new to socket programming. I have a GPS Tracker that connects and send data to a defined public server:port through GPRS connection. I am getting the result on the terminal. I want to know how ...
0
votes
1answer
177 views

Registering socket connection with Node.js tcp server

Say I have a Node.js tcp server: const map = new Map(); const s = net.createServer(function(socket){ socket.pipe(jsonParser()).on('data', function(v){ v && v.pid && map....
1
vote
0answers
55 views

How to pause and resume 'socketserver'?

How do we pause and resume 'socketserver'??? I've been looking at socketserver documentation but I couldn't find the reference. https://docs.python.org/3.4/library/socketserver.html. I initialize ...
0
votes
1answer
1k views

OSError: [Errno 22] Invalid argument?

I promise I will give you 100 reputation if you can solve this in 20 minutes... I'm in very emergent situation. I'm running this command: python3 ringo.py F 6003 networklab1.cc.gatech.edu 6002 2 ...
0
votes
1answer
96 views

How to allow or deny remote connections in Python's SocketServer?

I'm creating an extremely simple Vega visualization viewer: it's a one file module that serves a base HTML page containing just the Vega graphic and an HTML5 EventSource of updates. The user (me) is ...
1
vote
1answer
36 views

Python socketserver different tasks

I have (what is likely) a very beginner-type question about sockets in Python 3 that I haven't been able to find an answer to so far: Excluding options like threading or concurrency, what I'd like to ...
0
votes
1answer
573 views

How to protect against DDOS attack socketserver python

I'm planning on incorporating a server into an application I'm developing (none of the data being transferred will be sensitive). I've set up port forwarding on my router that points to the server on ...
0
votes
1answer
635 views

How to stop TCPServer

On every of three iterations TCPServer needs to be started and then immediately stopped. All three times it needs to be started on port 8000. As it defined in a code below, the TCPServer starts. But ...
2
votes
2answers
9k views

Asynchronous Socket Server in C#, client to client communication through socket server

I am trying to develop server/client Asynchronous sockets using c#. I have followed guide on MSDN Link. In my case, socket server listening on particular endpoint, many clients can connect to server ...
2
votes
3answers
1k views

Shutdown for socketserver based Python 3 server hangs

I am working on a "simple" server using a threaded SocketServer in Python 3. I am going through a lot of trouble implementing shutdown for this. The code below I found on the internet and shutdown ...
3
votes
0answers
75 views

Can NodeJS function app.listen() Choose site IP? [duplicate]

I have a Windows Server host with two network cards: 192.168.1.205 and 192.168.1.206; 192.168.1.205 Running IIS and using 80 port and 443 port which is working fine, I expect 192.168.1.206 used as ...
1
vote
1answer
235 views

Python SocketServer send message from server

I use a TCP server in python, that implements this class: class ThreadedTCPServer(SocketServer.ThreadingTCPServer): pass The normal use of it works perfect (initiating the server, handling ...
3
votes
1answer
466 views

Python socket server failing

I'm trying to start a UDP server in python 3. I copied the code from this example. This is my exact code. import socketserver class MyUDPHandler(socketserver.BaseRequestHandler): """ This ...
-2
votes
1answer
97 views

Python TCP Socket server store messages from clients

I want to store all the messages from clients in a list on my 'TCP server'. import SocketServer class MainServerHandler(SocketServer.BaseRequestHandler): requests = [] def handle(self): ...