[Xcb] [Socket handoff] Waiting forever...

Jamey Sharp jamey at minilop.net
Thu Jul 2 09:48:29 PDT 2009

On Thu, Jul 02, 2009 at 10:43:06AM -0400, Clemens Eisserer wrote:
> Sorry for all the traffic.

No, that's exactly what the list is for. :-)

> I am a bit puzzled by the fact that xcb_poll_for_reply only accepts a
> 32-bit sequence number, whereas xcb seems to use 64-bit internally.

Historical mistake. :-( If we had it to do over again we'd use 64-bit
sequence numbers everywhere in the API. Probably XCB will get some new
entry points some day that have 64-bit types in them.

Suggestions for API- and ABI-compatible ways to fix those types would be
welcomed. :-)

> How should I generate that 32-bit sequence number, to work arround
> overflow problems?

Just don't wait for four billion requests to go by before requesting
responses with xcb_poll_for_reply, and everything should be fine. Even
if you do wait that long it might still work. The XCB implementation was
written with an awareness that this is a problem.

> Well, the code looks more or less like the sample code, in java there
> are no lightweight structs like C has.
> With the exception that I use a stack-like memory (putByte(), putShort(), ....).

Ah, something resembling DataOutputStream or ByteBuffer? That's pretty

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20090702/2f7c8a10/attachment.pgp 

More information about the Xcb mailing list