[Xcb] Porting XCB to win32 - anyone interested?

Jeetu Golani jeetu.golani at gmail.com
Sun Mar 23 20:48:24 PDT 2008


Hi all :),

>> i don't know if you know it, but pthreads has been ported (more or less) 
>> to windows:

>> http://sourceware.org/pthreads-win32/

Vincent thanks for the link, I was aware of the win32 port of pthreads however 
since I've never looked deeply into it I put a question mark to it :)

>> A bigger issue is that Windows sockets are not file handles, and have  
>> their own API. (The WSA API does have scatter/gather: see http:// 
>> msdn2.microsoft.com/en-us/library/ms740138(VS.85).aspx)

>> The more common case of local server connections ("Unix sockets")  
>> would want to use a lighter-weight transport mechanism, like named  
>> pipes (which are file handles). You could at least write your own  
>> implementation of writev() implemented on top of write. It might also  
>> be worth investigating the Asynchronous I/O calls in the Win32 API.

Ian - since windows itself doen't have the UNIX style sockets mechanism, I was 
thinking of implementing functionality using only the WSA API to provide 
TCP/IP communication to a server (local or remote).

If my understanding is correct than trying to rewrite my own implementation of 
writev() with multiple write() functions would be inefficient and I wouldn't 
garner the true benefits of Scatter/Gather. I was looking into implementing 
this using either the ReadFileScatter WriteFileGather functions - which 
require page alignment for the buffers....or I've been leaning towards using 
WSASend and WSARecv which as similar to the writev/readv mechanism on POSIX.

Please correct me on any of the above.....enlighten me....and give me nirvana 
haha :)

Bye for now

 


On Monday 24 Mar 2008, Ian Osgood wrote:
> On Mar 23, 2008, at 1:22 PM, Jeetu Golani wrote:
> > Hello,
> >
> > I'm looking to take on the task of porting XCB to win32.
> >
> > As mentioned in a previous thread, I need the ability to write X
> > clients
> > within windows (no Cygwin) and my quest brought me to the door of
> > XCB. I
> > think it's a nice and concise library and I'd like to have it
> > running native
> > in Win32.
> >
> > I think the network transport layer would probably need the most
> > work - the
> > Scatter/Gather IO mechanism definitely needs work.
>
> A bigger issue is that Windows sockets are not file handles, and have
> their own API. (The WSA API does have scatter/gather: see http://
> msdn2.microsoft.com/en-us/library/ms740138(VS.85).aspx)
>
> The more common case of local server connections ("Unix sockets")
> would want to use a lighter-weight transport mechanism, like named
> pipes (which are file handles). You could at least write your own
> implementation of writev() implemented on top of write. It might also
> be worth investigating the Asynchronous I/O calls in the Win32 API.
>
> > The pthreads library would
> > also need work I suppose, though I haven't reached that far into my
> > understanding of the code.
>
> See Vincent's answer about pthreads-win32.
>
> > That said, I'm by no ways an expert on X programming, nor do I
> > understand the
> > XCB code completely :)....therefore if there're other people in the
> > community
> > that are interested in helping out, I'd appreciate it :).....pls
> > write in to
> > me :)
> >
> > Bye for now
>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb




More information about the Xcb mailing list