Questions tagged [socketserver]

Python module which simplifies the task of writing network servers.

385 questions
0
votes
1 answer

Listening to 3 different ports using sockets in 3 different threads

My main class defines the ExecutorService object with newFixedThreadPool of 3 threads. public static void main(String[] args) { queue = new ArrayBlockingQueue>(MAX_QUEUE_LENGTH); socketThreads =…
Madz
  • 199
  • 5
  • 18
0
votes
1 answer

Is there a way to list all connections to socketserver in Python3?

I'm wondering if there's a way to list or iterate through the sockets currently open with socketserver. Here's how it is basically structured: class SSL_TCPServer(TCPServer) def __init__(self, private, public, server_address,…
Goodies
  • 4,439
  • 3
  • 31
  • 57
0
votes
1 answer

confused what to use- Tomcat or java socket server

I want a piece of java code to run on a particular port. for exampple localhost:007 will return {key: value} should i write a socket server in java, or should I use Tomcat?
isnvi23h4
  • 1,910
  • 1
  • 27
  • 45
0
votes
1 answer

Why does putting a socket in a queue close it?

I'm writing a server that operates with a fixed number of workers, each with different properties (in the snippet below, n is such a property. Upon getting a request, I would like to put it into a queue, so the first available worker can deal with…
user674155
0
votes
1 answer

how to detect client's Internet speed from the response headers in java?

I have a server to get a response headers through which I detect the type of device. Is there any way I can get the Internet speed through response headers or any other method ? Server_X: public class Server_X { static int count = 0; …
0
votes
1 answer

stop recv from socket if no data is available

I am trying to stop recv from waiting endlessly for input. First I tried: recv = bytes('','UTF-8') while True: data_recv = self.socketclient.recv(1024*768) if not data_recv: break else: recv += data_recv return…
Mrob
  • 281
  • 4
  • 16
0
votes
1 answer

HTTP Status 404 - /GroupChat/ The requested resource is not available

I am working on a project to build a group chat app on socket server! but when I start the server it get started and displays the following error: HTTP Status 404- /GroupChat/ type Status report message /GroupChat/ description The requested resource…
0
votes
0 answers

Trying to send data to android using socketServer in Java

I'm making some sort of scoreboard controlled by an android app. I got working sending data to the server, but I'm trying to sync the score on my JFrame and on my android app, but it's not working. Can't see why it isn't working, I can send data to…
Josue Mavarez
  • 85
  • 2
  • 8
0
votes
2 answers

SocketServer unblocks by reading 0 bytes

I am implementing a websocket server and I have an issue where rfile.read of the module SocketServer sporadically will unblock when reading 0 bytes. Most times this is fine, until I start making random requests back and forth. Here is a snipper from…
Pithikos
  • 18,827
  • 15
  • 113
  • 136
0
votes
0 answers

Reuse of sockets

I have a simple TCP server using the socketserver library. It used to work fine, but now I get this error message whenever I run it: socket.error: [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally…
rlms
  • 10,650
  • 8
  • 44
  • 61
0
votes
1 answer

How to obtain typed character to java server through Android socket

I am creating a Remote PC app on android. I have written a code to obtain keyunicode of the pressed keys as shoen below AndroiClient.java public boolean dispatchKeyEvent(KeyEvent event) { if(event.getAction()==KeyEvent.ACTION_DOWN){ …
Suroor Ahmmad
  • 1,110
  • 4
  • 23
  • 33
0
votes
1 answer

steps to follow in socket programming for a multiplayer online game in actionscript-3 flash?

I have created a multiplayer ludo game using actionscript-3 flash, I want to uploaded into website, before this I want to use socket server to this game.I have no idea on socket programming. how to start socket programming to this project? please…
Kogile
  • 528
  • 5
  • 16
0
votes
1 answer

Making all attributes and methods available for a socket server in Python

I use a Raspberry Pi to collect sensor data and set digital outputs, to make it easy for other applications to set and get values I'm using a socket server. But I am having some problems finding an elegant way of making all the data available on the…
Thomas Jensen
  • 2,138
  • 2
  • 25
  • 48
0
votes
0 answers

Socket outputstream not flushing android

I am new to the Android world, and I'm trying to make a simple socket tcp server/client chat application. I am using twisted (python) for the server. Here is the source code: from twisted.internet import reactor, protocol, endpoints from…
user1812076
  • 269
  • 5
  • 21
0
votes
1 answer

Access client IP from handler

i'm wondering, can I access the address of the client from a SocketServer.StreamRequestHandler (or more specifically, a subclass)? I didn't see any documentation on that. Thanks!
kotakotakota
  • 731
  • 8
  • 26