sbt / ipcsocket

IPC: Unix Domain Socket and Windows Named Pipes for Java
Other
45 stars 17 forks source link

calling toString() on a connected UnixDomainSocket returns Socket[unconnected] #22

Open inieves opened 2 years ago

inieves commented 2 years ago

I noticed that UnixDomainServerSocket returns useful information on a call to toString(), but it's friend UnixDomainSocket does not return useful information, it actually returns incorrect information: Socket[unconnected]

More useful and correct output would be the path that was used to create the socket.

I have not tested the Win32NamedPipeSocket but I suspect a similar issue would occur.

eed3si9n commented 1 month ago

I guess toString is coming from the Socket class? Here's a PR to try to fix this - https://github.com/sbt/ipcsocket/pull/44