Issue with _dbus_write_socket on windows

Havoc Pennington hp at redhat.com
Mon Dec 11 08:20:04 PST 2006


Ralf Habacker wrote:
> Havoc Pennington schrieb:
>> I already mentioned that in another mail - you may need to write a new
>> DBusTransport variant that uses named pipes or Windows messages. That
>> would be cleaner and faster anyway. 
> Christian  Ehrlicher tried to implement  named pipes and recognized that
> there are major problems causes by the way named pipes are implemented
> in windows.
> Dbus transport layers are build up in all the same manner:
> 
...
> Named pipes does not have a wait function mentioned in 3.

According to the docs there are three ways to do this:
  - use threads
  - WaitForMultipleObjects()
  - WaitForSingleObjectEx()

There are examples of all three under the "using pipes" section, the 
various ways to write a server.

> There is only
> a PeekNamedPipe function, which returns immediatly regardless if there
> is data or not, which requires to implement a time consuming idle loop
> in the application  itself.  There is a way to define completion
> functions, but they are called after ReadFile(), which does not fit in
> current dbus calling structure.  :-(  

You could certainly change the calling structure if required.

Fortunately Thiago's suggestion to have the OS pick a TCP port for us 
should work fine.

Havoc



More information about the dbus mailing list