On Sat, 7 Apr 2001 16:30:00 -0400, Steven D. Arnold <stevena at permanent.cc> wrote: >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) You can't listen() for connections on a connectionless protocol. The listen() operation is only valid for connection-oriented protocols, and not for datagram protocols. To accept connections, a socket is first created with socket(2), a willingness to accept incoming connections and a queue limit for incoming connections are specified with listen, and then the connections are accepted with accept(2). The listen call applies only to sockets of type SOCK_STREAM or SOCK_SEQPACKET. >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? Skip the listen() call and just call recv(). -- Grant Edwards grante Yow! Youth of today! Join at me in a mass rally visi.com for traditional mental attitudes!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4