0

AFAIK, if a unix socket is created as type SOCK_STREAMS then it's unidirectional, and if SOCK_DGRAM then it's bidirectional.

I'm looking at using node-ipc for IPC via unix sockets. It has an example of a client and server that communicate supposedly via a unidirectional unix socket SOCK_STREAMS - yet seems to send messages in both directions.

What am I missing? Is the same socket path being used in two directions? Is it really using SOCK_STREAMS?

Jodes
  • 14,118
  • 26
  • 97
  • 156

1 Answers1

3

AFAIK, if a unix socket is created as type SOCK_STREAMS then it's unidirectional, and if SOCK_DGRAM then it's bidirectional.

No. Domain SOCK_STREAMS are bi-directional as in the case of internet SOCK_STREAMS.

Prabhu
  • 3,443
  • 15
  • 26