Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16D7ED285 for ; Fri, 9 Nov 2012 20:37:02 +0000 (UTC) Received: (qmail 86535 invoked by uid 500); 9 Nov 2012 20:37:01 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 86469 invoked by uid 500); 9 Nov 2012 20:37:01 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 86460 invoked by uid 99); 9 Nov 2012 20:37:01 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2012 20:37:01 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2012 20:37:01 +0000 Message-ID: <509D6969.1090404@apache.org> Date: Fri, 09 Nov 2012 20:36:57 +0000 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: Websocket ping/pong feature request References: <509D39E5.1070206@apache.org> In-Reply-To: <509D39E5.1070206@apache.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 09/11/2012 17:14, Mark Thomas wrote: > On 09/11/2012 16:03, Sean Winterberger wrote: >> We are attempting to implement ping/pong functionality but have run into a >> wall with the Tomcat Websocket implementation. Unless we are missing >> something, there seems to be no way of modifying the opcode on a frame >> prior to sending it without using reflection. The WsOutbound object >> currently has a method for pong, but we would like to be sending a ping >> from the server to all clients. >> >> We could implement our own ping/pong with our client devices however the >> RFC implementation is much more attractive due to its small size, plus we >> already have it implemented in our websocket implementation on the client >> side. >> >> If there was a way to safely get a handle on the UpgradeOutbound object we >> could write the frame ourselves. >> >> Is there any plan to add a ping(ByteBuffer data) method or a method which >> allows modifications to the opcode of a frame? > > No plans (focus is currently on Tomcat 7 bugs and Tomcat 8) but a patch > that implemented ping should be pretty simple and is very likely to be > accepted. ping() is almost just a copy and paste of pong(). > > An enhancement request in BZ is the way to go with this. If you are able > to provide a patch in the next few days it will almost certainly make it > into 7.0.33 else it should be in 7.0.34. https://issues.apache.org/bugzilla/show_bug.cgi?id=54127 Patch provided. Patch applied. Will be in 7.0.33. Thanks Sean. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org