Questions tagged [socketserver]

Python module which simplifies the task of writing network servers.

385 questions
0
votes
2 answers

Issues with implementing a network server with SocketServer

I am beginner in socket programming and need your help. I have implemented simple echo server using ThreadedTCPServer example from the Python documentation. It works fine, but I have the following problems: Server hangs (in socket.recv) when Client…
Zakhar
  • 2,143
  • 2
  • 15
  • 15
0
votes
1 answer

Simple broadcasting socket server in Akka and Scala

I am learning how to build simple broadcasting socket server in Akka and Scala, I have finished below so far and it can handle basic socket connection from my testing client. Here is the code. import…
0
votes
2 answers

python socketserver MyRequestHandller call a function

In python,I created a socketserver using socketserver, when I want to call a function in the handle method, it shows that the function is not defined,why is that? Here is the code: from socketserver import (TCPServer as TCP, StreamRequestHandler as…
0
votes
1 answer

Can't run sample code with TestChat from SocketRocket

I'm launching python server, seems it's working OK, but I can't connect to it from iOS TestChat and I'm receiving Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" SocketRocket iOS client python websocket server on Tornado
0
votes
1 answer

How to connect to a website using the headers which browser sent?

I'm using socketserver on java and listening to port 8080, and my browser sends me header Infos. So how can I retrieve a Web page using this headers with my injected headers?
Walker
  • 131
  • 2
  • 16
0
votes
2 answers

Accessing Sockets with Python SocketServer.ThreadingTCPServer

I'm using a SocketServer.ThreadingTCPServer to serve socket connections to clients. This provides an interface where users can connect, type commands and get responses. That part I have working well. However, in some cases I need a separate thread…
Dave
  • 1,326
  • 2
  • 11
  • 22
0
votes
3 answers

How to connect a client to a server with sockets, using ip adress in Python?

This is probably very simple, but I am having trouble with it. This is code I am using for the server. I've searched for this but I only found different kinds of sockets to the one I am using. server = socket.socket() server.bind(("localhost",…
0
votes
0 answers

How to optimize my "Threaded UDP Server"

I am making a multiplayer platforming game, and currently there are server performance issues once I have about 7+ clients connected. I was told earlier last week that I should investigate socketserver since previously I had been writing my own…
0
votes
0 answers

Chat program using socketserver, how do you make a client "listen forever"?

Before using socketserver and TCP, my chat client would listen like this: def recvData(self): try: while True: data = self.sock.recv(1024) if data: data_handler(data) except: …
0
votes
0 answers

Using Telnet with Android App

I'm developing an App that opens a SocketServer and gets commands from telnet. Until I'm under the same LAN there are no problems and everything works. Trying with the phone network I can't reach the phone using telnet. There is any way to solve…
Manuel Castro
  • 1,633
  • 3
  • 24
  • 38
0
votes
1 answer

Java Server producing inconsistent output

I want to integrate a server with multiple clients for a blackjack game I created, and thus I began practicing with servers in java. I create a thread, that when ran, forces the server to listen for input and produce an output. Then I added a…
Connor Butch
  • 648
  • 1
  • 10
  • 28
0
votes
1 answer

Server Side program connection details

I have gone through this program which I found in a book for Java. But I have a very basic question to which I could not find any specific answer on the internet. My code: I have reduced the code to all what's relevant to my question. import…
Mathews Mathai
  • 1,707
  • 13
  • 31
0
votes
1 answer

Dealing with dead sockets in rtmp.py

I am currently using rtmp.py for an RTMP live stream server. It works well, however several times a day, an individual with a presumably poor connection will vacate and leave their socket behind. Worse, nothing closes it except killing the entire…
matthews
  • 11
  • 2
0
votes
1 answer

Broadcast Chat Server Using socketserver in Python

I am new to python and I am using socketserver to try to create a server that broadcasts all the received message from one client to all the connected clients, but facing a problem. I get the following error in the end: Exception happened during…
Umair47
  • 1,102
  • 1
  • 8
  • 12
0
votes
1 answer

C socket programming:single server multiple clients

for (i = 0; i < climax; i++) //input output operations from clients { sockfd = client_socket[i]; if (FD_ISSET( sockfd , &fds)) { if ((valread = read( sockfd , request, 1024)) == 0) //check for disconnection of client { …