> From: "Paul Wallace" <[EMAIL PROTECTED]> > Sent: Wednesday, August 10, 2005 6:38 PM
> Hi and thanks for that, > That's the crux of my question! The data (I am unsure of the > protocol it is delivered in) is sent at random points in time i.e not from > any request. I wish to create particularly the client (server B) that > listens for this data. I (mistakenly) mentioned server A to mimic the data > pushes. I can write something to fire off data at intermittent times, but I > am more interested in how to capture that data, when no request has been > made. This is the reason why I first questioned on Sockets. > Perhaps I should have been clearer from the off! Yea, that "protocol" detail is kind of important. As others have said, Tomcat is set up for HTTP requests, and pretty much ONLY HTTP requests. As much as it would be nice to extend GenericServlet to work with ANY protocol, in truth it just doesn't happen and is not really practical. The GenericServlet interface is still pretty heavily tainted by HTTP. If you want to listen to HTTP datastreams, then Tomcat is the hot tip. If not, then you can start with the Jakarta Avalon project (which is basically dead). Avalon was a lower level container designed to be the boiler plate so you can focus on implementing your own protocols. While the actual Avalon project is dead, the current project page shows you how it has forked into several other projects, so you can use that as a starting point to perhaps hunt down a framework to more easily handle your own protocol. Now, to be fair, if you don't have any real VOLUME of data (lots of connections, high load, vs just the occasional chit-chat), you may well be able to write a simple server in just plain Java. A simple server is not difficult, and there are no doubt several examples on the net. Listening to a socket is no longer the rocket science it once was. Just depends on your tolerance for getting it to work vs learning a framework. Finally, if you REALLY want to dig in to the Tomcat internals, you can break it into little pieces and bits and hammer to fit to support your protocol. Also, there's the book "How Tomcat Works" which is actually a pretty good book if you want to know how to write a network server in Java. Regards, Will Hartung ([EMAIL PROTECTED]) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
