main website home
  • About this blog

    This blog features updates, opinions, and technical notes from Caucho engineers about Caucho products, the enterprise Java industry, and PHP. Caucho Technology is the creator of the Resin Application Server and the Quercus PHP in Java engine. A leader in Java performance since 1998, Caucho is a Sun JavaEE licensee with over 9000 customers worldwide.
  • Tags

    ajaxworld bam candi cdi cloud cluster comet configuration deploy devoxx eclipse ejb embedded flash flex google app engine hessian hmtp ioc java ee 6 javaone javazone jms messaging newsletter nyjug osgi php pomegranate quercus resin resin 4.0 REST servlet sfjug silicon valley code camp spring testing training tssjs watchdog webbeans web profile websockets wordpress
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
« TSSJS Recap
TSSJS 2010 Round-UP »

WebSocket API in Resin 4.0.x

Our WebSockets API is not available in the JavaDoc at

http://caucho.com/resin-4.0-javadoc/com/caucho/servlet/package-summary.html

The basic classes are similar to the Servlet 3.0 async. The main application interface is WebSocketListener. When a new data is available on the socket, Resin will call the onRead method. The application can then read the entire frame from the socket.

The WebSocketContext gives access to the underlying InputStream and OutputStream of the socket. These are raw streams, because we want to give frameworks control over every byte. In other words, the application’s sub-protocol is in a better position to parse the WebSocket framing efficiently.

The WebSocketServletRequest is implemented by Resin’s HttpServletRequest. Basically, it’s a way for us to extend the Servlet 3.0 HttpServletRequest without actually modifying it. I’d expect Servlet 4.0 to add the startWebSocket method directly.

This entry was posted on Tuesday, March 23rd, 2010 at 10:38 am and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.


Caucho Technology is proudly powered by WordPress and Quercus®
Entries (RSS) and Comments (RSS).

  • HOME |
  • CONTACT US |
  • DOCUMENTATION |
  • BLOG |
  • WIKI 4 |
  • WIKI 3 |
  • Resin: Java Application Server
Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.
resin® is a cloud optimized, java® application server that supports the java ee webprofile ®