Xinetd & python server script. problem to get data from from client

ilia.meerovich at ilia.meerovich at
Mon Jul 30 08:53:59 CEST 2007

I wrote simple script to test communication:
When i connect via telnet like: "telnet localhost 51423" the server is
working send and receive information. but when i connected to him via
client scrip so client script receive messages from server but server
doesn't receive message from client. In xinetd.conf and servers conf
file "only_from =" already choosen. What can i do?
Here below are my client and server:
Thank you :)


#!/usr/bin/env python
# example

import sys
import os

print "Wellcome"
print "please enter the string"
line = sys.stdin.readline().strip()
print "You entered %d characters." % len(line)


import sys
import string
import os
import time
import socket
import popen2

PORT = 51423
HOST = ""#sys.argv[1]
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((HOST, PORT))
print "Connected from:", sock.getsockname()
print "Connected to:",sock.getpeername()
while 1:
     print "waiting"
     result = sock.recv(1024)
     print result
     print "Sent: foo"
     if result == 3:

More information about the Python-list mailing list