here is its:
# a simple tcp server
import SocketServer
class EchoRequestHandler(SocketServer.BaseRequestHandler ):
def setup(self):
print self.client_address, 'connected!'
self.request.send('hi ' + str(self.client_address) + '\n')
def handle(self):
while 1:
> See the SocketServer module, both the documentation and the source code.
I firstly looked at this module and its __doc__, yet I still need an
'hello world' sample. and couldn't get it straight how can I write my
own hello world sample with SocketServer objects.
--
http://mail.python.org/mailm
> Even simpler, use Twisted:
I am afraid Twisted is not the right choice in my case. I am looking
for smaller, simpler and minimal server sample.
--
http://mail.python.org/mailman/listinfo/python-list
Tzury Bar Yochay <[EMAIL PROTECTED]> writes:
> In my case I need a simple server that can serve more than one client.
> I couldn't find an example on how to do that and be glad to get a hint.
See the SocketServer module, both the documentation and the source code.
--
http://mail.python.org/mailma
On Wed, 07 Nov 2007 18:54:39 -, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote:
>hi, the following sample (from docs.python.org) is a server that can
>actually serve only single client at a time.
>
>In my case I need a simple server that can serve more than one client.
>I couldn't find an example o
On Nov 7, 2007, at 12:54 PM, Tzury Bar Yochay wrote:
> hi, the following sample (from docs.python.org) is a server that can
> actually serve only single client at a time.
>
> In my case I need a simple server that can serve more than one client.
> I couldn't find an example on how to do that and b
On Nov 7, 1:54 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote:
> hi, the following sample (from docs.python.org) is a server that can
> actually serve only single client at a time.
>
> In my case I need a simple server that can serve more than one client.
> I couldn't find an example on how to do t
hi, the following sample (from docs.python.org) is a server that can
actually serve only single client at a time.
In my case I need a simple server that can serve more than one client.
I couldn't find an example on how to do that and be glad to get a
hint.
Thanks in advance
import socket
HOST =