Closed zJudGenie closed 3 years ago
Datagram sockets are currently not supported. What's your use case?
+1
Use case is low latency inter process event handling. It would be nice not having to frame messages.
Datagram sockets are currently not supported. What's your use case?
As @sly010 said I use datagram socket for IPC with Hostapd
Thanks for reporting the enhancement request!
Starting with version 2.4.0, junixsocket supports AF_UNIX datagram sockets. See AFUNIXDatagramChannel
/ AFUNIXDatagramSocket
/ AFUNIXSelectorProvider
for details.
Hi, I started using unix socket yesterday, i tried connect to a SOCK_DGRAM type socket created from hostapd using the code
socket(PF_UNIX, SOCK_DGRAM, 0)
but when i try to connect from junixsocket i receive the errorjava.net.SocketException: Protocol wrong type for socket
i already tried to change socket file path and permission like #66 issue said but nothing so I think that junixsocket is trying to use TCP protocol instead of UDP, i tried to donc -U /tmp/hostapd/wlan0
and i receive same error Protocol wrong type for socket but if I add the parameter -u that stands for UDP mode all works well Thanks for all the answers