directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: Problem send long to client connected with DatagramAcceptor
Date Sat, 21 May 2005 02:37:11 GMT
Hi Cameron,

2005/5/21, Cameron Ross <cross@symboticware.com>: 
> 
> Hello,
> 
> I'm trying to send a CRC checksum back to a client connected to my
> server throguh a DatagramAcceptor using the following:
> 
> long crc = 1234;
> ByteBuffer writeBuffer = ByteBuffer.allocate(8);
> writeBuffer.putLong(0, crc);
> session.write(writeBuffer, null);
> 
> The client (written in C) receives 8 bytes as expected, however the
> receive buffer is empty.

 You forgot to flip your buffer before writing it. :)
 Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message