python-socketserver

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 TestRequestHandler? Some suggestions? import threading import SocketServer from socket import * clas...

python listen 2 port same file

Hi, I would like to listen on 2 different UDP port with the same server. I use SocketServer lib for my server, and basicly it looks like that; SocketServer.UDPServer(('', 7878),CLASSNAME) I would like to listen on 7878 and 7879 with the same server and same file. Is that possible ? If yes how ? Thanks in advance. ...

socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Hello all. I'm trying to create a custom TCP stack using Python 2.6.5 on Windows 7 to serve valid http page requests on port 80 locally. But, I've run into a snag with what seems like Windows 7 tightened up security. This code worked on Vista. Here's my sample code: import SocketServer import struct class MyTCPHandler(SocketServer....

Issues with implementing a network server with SocketServer

Dear Friends! 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: 1) Server hangs (in socket.recv) when Client tries to send zero-length data. 2) Server hangs (in socket.recv) when th...