users@grizzly.java.net

Example of embedded TCP packet socket server using Grizzly

From: javaguy44 <javaguy44_at_yahoo.com>
Date: Mon, 2 Nov 2009 08:10:00 -0800 (PST)

Hi,

I'm new to Grizzly & NIO and was wondering if there are any experts out
there who could give me a hand.

I've been trying to piece together an example with various bits of forum
posts, examples and tests that people have submitted but I haven't been able
to achieve a simple TCP server + Grizzly framework that can receive requests
and return responses

What I'm trying to do is see how viable it is to use the Grizzly Framework
for an embedded TCP server.

Using this example
http://gallemore.blogspot.com/2007/07/using-grizzly-to-read-tcp-packets.html
I'm able to read the packets. However I'm unable to write a response :(

Could someone assist in showing me an example for how to return a response
to the client?

I've also tried to use TCPSelectorHandler with a CallbackHandler but it's
still not clear how to receive a tcp packet request and respond
appropriately.

I'd be more than happy to submit these examples in a "Getting Started" type
scenario; I can imagine that Grizzly would be much better for using an
embedded TCP socket server as opposed to re-inventing the wheel.

Thanks and look forward to your reply!
-- 
View this message in context: http://old.nabble.com/Example-of-embedded-TCP-packet-socket-server-using-Grizzly-tp26157720p26157720.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.