Basically I think you need to compromise and have a 2 stage process with a SOCK_STREAM socket as stage 1 and SOCK_DGRAM as stage 2. So it will be like this:
server:
- create SOCK_STREAM socket "my.daemon.handshake"
- accept client
- send a randomly generated string XXX to the client and close the socket
- create a SOCK_DGRAM socket "my.daemon.XXX" and start processing it
- repeat (2)
client
- connect to socket "my.daemon.handshake"
- read to EOF -- get value XXX
start communicating with server on socket "my.daemon.XXX"
profit!!!!