On Apr 27, 2006, at 7:30 PM, andrew at kellerfarm dot com wrote:
Is a TCP socket only supposed to fire DataAvailable when it gets a
complete transmission, or does it fire for every packet?
It fires whenever data is available. It doesn't know what your protocol
considers a "complete transmission." It's a regular TCP socket that can
be used to write any TCP-based protocol.
Should I create my own buffer and put markers at the beginning and end
of the transmission so that I know when it completes?
That is definitely one way to approach it. Another is to lead each
"transmission" with 4 bytes that says how long the transmission will
be. Then you have an easy way to tell if you have enough data for the
entire transmission.
HTH,
Jon
--
Jonathan Johnson
REAL Software, Inc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
From Thu 27 Apr 2006 18:42:02 -0600
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with ESMTP (Eudora Internet Mail Server 3.1.3);
Thu, 27 Apr 2006 19:42:20 -0500
Received: from lists.realsoftware.com (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP
id 60D621226021; Thu, 27 Apr 2006 19:42:08 -0500 (CDT)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from hoggle.dreamhost.com (hoggle.dreamhost.com [66.33.197.5])
by lists.realsoftware.com (Postfix) with ESMTP id E5C851226013
for <realbasic-nug at lists dot realsoftware dot com>;
Thu, 27 Apr 2006 19:42:02 -0500 (CDT)
Received: from [10.0.1.2] (c-67-174-105-26.hsd1.co.comcast.net [67.174.105.26])
by hoggle.dreamhost.com (Postfix) with ESMTP id 0B1EF731AA
for <realbasic-nug at lists dot realsoftware dot com>;
Thu, 27 Apr 2006 17:42:01 -0700 (PDT)
Date: Thu, 27 Apr 2006 18:42:02 -0600
From: joe at strout dot net
To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
In-Reply-To: <028EE789-E41A-4C8C-B9DC-61AD07617F2F at kellerfarm dot com>
X-Mailer: VerEx Email Gateway
Content-type: text/plain;
Content-transfer-encoding: 7bit
Message-Id: <20060428004201 dot 0B1EF731AA at hoggle dot dreamhost dot com>
Subject: Re: TCP transmissions
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com
Andrew Keller wrote:
I am having a bit of trouble with some TCP transmissions. Every once
in a while, a transmission is received that is not decoded properly
by my parsing subroutine. It usually works fine. I didn't think
about it very much until I noticed that sometimes, the dictionary
that is built from the transmission (my transmission parsing
subroutine returns a dictionary) is incomplete.
Yep, sounds to me like you're assuming that you've got a complete message when
DataAvailable fires. That's not necessarily the case.
Is a TCP socket only supposed to fire DataAvailable when it gets a
complete transmission, or does it fire for every packet?
It fires whenever there happens to be some data available when the socket code happens to
check for that. It has no relationship whatsoever to whether that data represents a
complete "transmission" (whatever that means in your protocol).
Should I create my own buffer and put markers at the beginning and end of the
transmission so that I know when it completes?
Yes, that (or something equivalent) is absolutely necessary. Or, use
EasyTCPSocket, which does that for you.
Best,
- Joe
--
Joe Strout -- joe at strout dot net
Verified Express, LLC "Making the Internet a Better Place"
http://www.verex.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
From Fri 28 Apr 2006 10:44:07 +1000
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with ESMTP (Eudora Internet Mail Server 3.1.3);
Thu, 27 Apr 2006 19:44:25 -0500
Received: from lists.realsoftware.com (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP
id 8E88E1226045; Thu, 27 Apr 2006 19:44:15 -0500 (CDT)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from mx0.police.tas.gov.au (mx0.police.tas.gov.au [147.109.254.68])
by lists.realsoftware.com (Postfix) with ESMTP id 1BF7E1226036
for <realbasic-nug at lists dot realsoftware dot com>;
Thu, 27 Apr 2006 19:44:08 -0500 (CDT)
Received: from hobartdr01.police.tas.gov.au (hobartdr01.police.tas.gov.au
[192.190.61.142])
by mx0.police.tas.gov.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id
k3S0i5jE023023 for <realbasic-nug at lists dot realsoftware dot com>;
Fri, 28 Apr 2006 10:44:05 +1000
To: realbasic-nug at lists dot realsoftware dot com
X-Mailer: Lotus Notes Release 5.07a May 14, 2001
Message-ID: <OFB8C9C4A8 dot B9D828A5-ONCA25715E dot 0003F695 at police dot tas dot
gov dot au>
From: Tim dot Barlow at police dot tas dot gov dot au
Date: Fri, 28 Apr 2006 10:44:07 +1000
X-MIMETrack: Serialize by Router on hobartdr01/TAS(Release 5.0.11 |July 24,
2002) at 28/04/2006 10:44:05 AM
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
X-Scanned-By: MIMEDefang 2.51 on 147.109.254.68
Subject: Control Properties in 2006r2
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com
Hi Everyone,
Apologies in advance if this problem with 2006r2 has already been raised.
I have a custom control that extends ListBox and this control has a
couple of string properties that are exposed in the control editor
(have 'window editor behavior' set). The properties appear in the
control editor pane and can be edited, HOWEVER my 'getter' method does
not return the set value.
For example :
1. I have a property in my control called 'myProperty',
2. The property appears in the control editor pane.
3. The property is set to 'blah'
4. Referencing 'myProperty' return an empty string
My code works just fine with 2006r1
Is this a problem with 2006r2 or have I missed something?
Thanks in advance for any help given.
Tim Barlow
Communications & Information Technology Services
X2317 (62302317)
tim dot barlow at police dot tas dot gov dot au
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
From Thu 27 Apr 2006 20:52:00 -0400
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with ESMTP (Eudora Internet Mail Server 3.1.3);
Thu, 27 Apr 2006 19:52:22 -0500
Received: from lists.realsoftware.com (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP
id 2914B12260C1; Thu, 27 Apr 2006 19:52:11 -0500 (CDT)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from mail2.mx.voyager.net (mail2.mx.voyager.net [216.93.66.206])
by lists.realsoftware.com (Postfix) with ESMTP id 5DFCF12260A2
for <realbasic-nug at lists dot realsoftware dot com>;
Thu, 27 Apr 2006 19:52:04 -0500 (CDT)
Received: from [192.168.0.102] (c-24-56-233-58.chrlmi.cablespeed.com
[24.56.233.58])
by mail2.mx.voyager.net (8.13.2/8.10.2) with ESMTP id k3S0q5F4033805
for <realbasic-nug at lists dot realsoftware dot com>;
Thu, 27 Apr 2006 20:52:05 -0400 (EDT)
Mime-Version: 1.0 (Apple Message framework v749.3)
In-Reply-To: <20060428004201 dot 0B1EF731AA at hoggle dot dreamhost dot com>
References: <20060428004201 dot 0B1EF731AA at hoggle dot dreamhost dot com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <8CD3029F-42E0-4323-A235-A803FA258DC4 at kellerfarm dot com>
Content-Transfer-Encoding: 7bit
From: andrew at kellerfarm dot com
Date: Thu, 27 Apr 2006 20:52:00 -0400
To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
X-Mailer: Apple Mail (2.749.3)
Subject: Re: TCP transmissions
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com
Okay, that works more nicely... It's amazing how many fewer errors
there are when the transmissions are completed!
When DataAvailable fires, are you guaranteed to never have then end
of one transmission and the beginning of another? Is it possible to
have multiple simultaneous transmissions?
Andrew Keller
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|