UNIX domain sockets problem

Steven D. Arnold stevena at permanent.cc
Mon May 1 02:00:32 EDT 2000


Hi,

I'm trying to create a server that uses UNIX domain sockets.  I am using 
the code below:

	from socket import *
	from os import unlink

	SERVER = socket(AF_UNIX, SOCK_DGRAM, 0)
	unlink("/home/stevena/socket")
	SERVER.bind("/home/stevena/socket")
	SERVER.listen(3)
	while (1):
		conn, addr = SERVER.accept()
		print "Connection accepted!"
		data       = conn.recv(1024)
		print "Data received:"
		print data

When I run this, I get the following error:

	Traceback (innermost last):
   	    File "./oosqlserv.py", line 14, in ?
     	    SERVER.listen(3)
	socket.error: (95, 'Operation not supported')

This is on a machine running Linux-PPC, using python 1.5.1.  I'll try it on 
regular RedHat Linux tomorrow, but surely listen() would be supported on 
Linux-PPC?  Anyone have a clue what's going on?


steve





More information about the Python-list mailing list