sionescu / iolib

Common Lisp I/O library
http://common-lisp.net/project/iolib/
MIT License
141 stars 31 forks source link

#'make-socket-pair error with datagram sockets #15

Open resttime opened 10 years ago

resttime commented 10 years ago

'make-socket-pair doesn't work when you try to set the set the type as a datagram socket.

Fix#1: Just adding the slots to the 'socket-datagram-local class definition that won't initialize.

Fix#2: Add a parent class 'active-socket or 'passive-socket which include those slots to the 'socket-datagram-local class. According to http://publib.boulder.ibm.com/infocenter/zvm/v6r1/topic/com.ibm.zvm.v610.edclv/socket.htm datagram sockets don't have active or passive component to it.

Fix#3: Remove the initializers from the arguments list whenever using a local datagram socket in the #'create-socket function. I'm not sure whether this breaks functionality.

I'm not sure what the implications are when doing any of the ways, only that i makes the errors go away.

sionescu commented 9 years ago

Hi @resttime, I'll have to investigate this a little. AFAICT socketpair(2) only supports the AF_UNIX/SOCK_STREAM combo.