hypfvieh / dbus-java

Improved version of java DBus library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/)
https://hypfvieh.github.io/dbus-java/
MIT License
185 stars 73 forks source link

Authentication hangs when using TCP. #106

Closed brett-smith closed 4 years ago

brett-smith commented 4 years ago

I am trying to use dbus-java as both a client and server on Windows. Windows does not support Unix sockets, so TCP must be used.

However, I found that authentication would always hang when using TCP. It was because :-

1) The zero byte at the start of the TCP conversation was being read, but the state flag was no moved on to the next state, so this read kept repeating sinking the actual command. 2) At the end of the authentication, BEGIN was not being sent.