From dev-return-9537-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Tue Nov 29 23:02:00 2005 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 64829 invoked from network); 29 Nov 2005 23:02:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Nov 2005 23:02:00 -0000 Received: (qmail 41438 invoked by uid 500); 29 Nov 2005 23:01:59 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 41290 invoked by uid 500); 29 Nov 2005 23:01:58 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 41279 invoked by uid 99); 29 Nov 2005 23:01:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2005 15:01:58 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.69.195.61] (HELO pop-gadwall.atl.sa.earthlink.net) (207.69.195.61) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2005 15:03:28 -0800 Received: from elwamui-huard.atl.sa.earthlink.net ([209.86.224.35]) by pop-gadwall.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1EhETg-0000d7-00 for dev@directory.apache.org; Tue, 29 Nov 2005 18:01:36 -0500 Message-ID: <28567295.1133305295704.JavaMail.root@elwamui-huard.atl.sa.earthlink.net> Date: Tue, 29 Nov 2005 18:01:35 -0500 (GMT-05:00) From: Colin Cullen Reply-To: Colin Cullen To: dev@directory.apache.org Subject: [MINA] message delimiters. Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: EarthLink Zoo Mail 1.0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi All, I am having a little problem with my messaging. I have modeled my app similar to the way the SumUp example application works. Things work fine as long as my messages are delimited by using \r\n at the end of the message. I would like to use a different single byte delimiter (0x03) (if possible? for compatiblity with the current client base) to end my messages, but I can't seem to get this to work (actually I don't know how to get this to work). I decided to try using my test client against both the echo example and the reverser example, to see if it behaves in the same manner in this regard. Both work fine as long as I use something like this to write my message: out = new PrintWriter(socket.getOutputStream(), true); out.println(payload); // contains /r/n ending to msg But if I leave off the \r\n, e.g., out = new PrintWriter(socket.getOutputStream(), true); out.print(payload); // no /r/n on the print Then both echo and reverser servers neglect to forward the message on to the rest of the framework -- which is the same behavior I get from my server. I am using SimpleServiceRegistry to initiate the framework. I am new to NIO and I am not sure what I am missing. Could somebody point me in the right direction? Thanks Colin