Questions tagged [socketserver]

Python module which simplifies the task of writing network servers.

385 questions
1
vote
1 answer

Trouble Sending integer over Socket Server

When trying to send and decode an integer using socketserver and port, I get the following error ValueError: invalid literal for int() with base 10: '' (full stack trace at end). I marked the place where the error is with #<----- in the client. Note…
sinθ
  • 11,093
  • 25
  • 85
  • 121
1
vote
1 answer

python socket and socketserver

I've been trying to make a multi-client server and i finally have and it works perfectly but what I want to do now is to instead of getting the clients address, get the client to type their name in and then the program will say "Bob: Hi guys"…
user2387537
  • 361
  • 3
  • 9
  • 17
1
vote
1 answer

Python socketserver send data to multiple clients cpu use high

My code accepts gps data from multiple sources aggregates it and sends it back out to multiple clients connected to a threaded single socket. I got it working but the output threads seem to run off with cpu resources. if I add code to wait for some…
1
vote
2 answers

send a variable to a TCPHandler in python

I'm confused as to how to send a variable to a TCPHandler using SocketServer.TCPServer in python.. HOST, PORT = hosts[0], args.port server = SocketServer.TCPServer((HOST, PORT), METCPHandler) server.serve_forever() Which calls: class…
willwade
  • 1,998
  • 2
  • 16
  • 22
1
vote
0 answers

Adding SSL support to socketserver Python3

I want to add SSL support to Server based on python3 (version 3.3) socketserver. I've found answer to my problem here, but this code doesn't work in Python 3. Method socket._fileobject is not longer available. Is there any way to get this example…
user2233244
  • 417
  • 1
  • 4
  • 6
1
vote
1 answer

Advice and Help Troubleshooting Client/Server Interaction for Cellular Modem Project

I need some advice and help troubleshooting a client/server interaction for a cellular modem project I'm working on. The client and server are written in Java. The questions I need some advice on are as follows: (1) I'm seeking advice on whether…
Ian McCoy
  • 13
  • 4
1
vote
1 answer

Releasing socket from SocketServer.ForkingTCPServer python

I am creating a ForkingTCPServer to act as a proxy. It handles perfectly fine, but will not release the socket after executing. I have already tried .shutdown() and .server_close() but they just cause the program to freeze up. How can I release the…
Franz Payer
  • 4,069
  • 15
  • 53
  • 77
1
vote
2 answers

How to call a exterior function from within a class - python

I'm trying to collect data which is being parsed via a socket. Here is my code: import pickle import SocketServer class SocketReciever(SocketServer.BaseRequestHandler): def handle(self): sint = self.request.makefile('rb') …
Uzer
  • 3,054
  • 1
  • 17
  • 23
1
vote
1 answer

Send/receive infinite loop with SocketServer - Python - ConnectionAbortedError

I am trying to use socketserver to create a simple server to send images to a client with TCP. First I send a catalogue to the client and then it responds with a request. In the handle of my server, I have this loop : class…
Loric
  • 1,678
  • 8
  • 28
  • 48
1
vote
2 answers

A server starting a client?

I just got a project in my Computer Science class. We got the assignment to use a Password Decryption solution provided by our teachers, and adapt it to be used across our network in a Master/Slave relationship. This means that a Master (Server)…
OmniOwl
  • 5,477
  • 17
  • 67
  • 116
1
vote
2 answers

telnet catch ctrl+c server

I have written a socket-server like here. If I type ctrl+c in telnet, the server don't do anything now. I want to catch it like signal(SIGINT,SIG_IGN) How can I do?
1
vote
1 answer

python SocketServer stuck on waitpid() syscall

I am using Python (2.7) SocketServer with ForkingMixIn. It worked well. However sometimes on heavy usage (tons of rapidly connecting/disconnecting clients) the "server" stuck, consuming all the idle CPU (shown 100% CPU by top). If I use strace from…
LGB
  • 728
  • 1
  • 9
  • 20
1
vote
3 answers

PHP Socket Server for multiple clients

Possible Duplicate: A PHP Socket Server with Flash Clients I am building an app in my server with the help of a flash developer, and he asked me to build a socket server to communicate with the database. He recommended me JAVA but I am not very…
Enrique Moreno Tent
  • 24,127
  • 34
  • 104
  • 189
1
vote
3 answers

Python SocketServer Listen on Multicast

I've been looking around to find a way to have SocketServer python module to listen on multicast without success. Anyone managed to do so ? Any insight will be greatly appreciated ! Thanks
user1473508
  • 195
  • 1
  • 5
  • 15
1
vote
3 answers

Blocking accept

I'm programing a TCP/IP Socketserver. My problem is, that my accept call is blocking and not accepting any new incomming connections when I (for example) telnet my server and do not send any data. When I'm sending anything or quit the telnet accept…
S. Braun
  • 143
  • 1
  • 7