[Klone-users] RE: Re: Status display for device using Klone and ajax

Trung, Tran Minh trungtm at hpt.vn
Fri Mar 21 03:32:59 EDT 2008


Hi,
I have integrated your status display klapp into my klapp. It is running
well. In myservice.c, I test with an integer (see below), 
    /* get ethstat and return a JSON object */
    msgchan_printf(mc, "{\"id\":\"ethstat\",\"data\":%d}",  rand() %
100);     
it's OK.

But when I test with a string (see below)
	/* get ethstat and return a JSON object */
	char* tmp = "test"; //this tmp in real will be read from shared
memory with a thread
    msgchan_printf(mc, "{\"id\":\"ethstat\",\"data\":%s}", tmp);     
It can not display string data.

So how can I test with a string!? And with an object is it OK!?

Thanks,

Tran Minh Trung 

-----Original Message-----
From: klone-users-bounces at koanlogic.com
[mailto:klone-users-bounces at koanlogic.com] On Behalf Of
klone-users-request at koanlogic.com
Sent: Saturday, March 15, 2008 11:09 PM
To: klone-users at koanlogic.com
Subject: Klone-users Digest, Vol 20, Issue 9

Send Klone-users mailing list submissions to
	klone-users at koanlogic.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
or, via email, send a message with subject or body 'help' to
	klone-users-request at koanlogic.com

You can reach the person managing the list at
	klone-users-owner at koanlogic.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Klone-users digest..."


Today's Topics:

   1. Re: Status display for device using Klone and ajax
questions
      (Trung, Tran Minh)
   2. Re: Re: Status display for device using Klone and ajax
      questions (Stefano Barbato)


----------------------------------------------------------------------

Message: 1
Date: Sat, 15 Mar 2008 11:27:14 +0700
From: "Trung, Tran Minh" <trungtm at hpt.vn>
Subject: [Klone-users] Re: Status display for device using Klone and
	ajax	questions
To: <klone-users at koanlogic.com>
Cc: thomas fossati <tho at koanlogic.com>
Message-ID:
	
<A0287EF1AF0DA94F81CB8938E06EEC6C350EBB at hpt-exbe-srv.hptvietnam.corp>
Content-Type: text/plain;	charset="us-ascii"

Hi thomas,
With your demo klapp about status display, it runs well. But when I put
it into my app, it can not run. It can not connect (always red). So in
your klapp, how can I debug the connection!?

Thanks a lot

Tran Minh Trung
 
-----Original Message-----
From: thomas fossati [mailto:tho at koanlogic.com] 
Sent: Tuesday, February 26, 2008 3:17 PM
To: Trung, Tran Minh
Subject: [?? Probable Spam] Re: Status display for device using Klone
and ajax questions

Hi Trung,

On Feb 26, 2008, at 2:21 AM, Trung, Tran Minh wrote:
> But in XMLSocket object, it uses Flash. So I wonder that can it run on
> device?

the flash object is executed inside the web browser of the client, not  
on the device.

The device is just hosting the flash code (together with its js  
wrapper) onto its embfs: the flash code is actually inert inside the  
device.  When a client connects the flash object is downloaded by the  
browser and executed by the flash plugin.

If it's not clear, ask me more.

ciao, t.

PS: if you think that your doubts/questions/findings would be useful  
to other people you could post them to the klone-users mailing  
list ... ( http://www.koanlogic.com/cgi-bin/mailman/listinfo/klone- 
users ).





------------------------------

Message: 2
Date: Sat, 15 Mar 2008 12:26:01 +0100
From: Stefano Barbato <barbato at koanlogic.com>
Subject: Re: [Klone-users] Re: Status display for device using Klone
	and ajax	questions
To: Klone users <klone-users at koanlogic.com>
Message-ID: <3A5181A1-7546-4547-A05B-7E46B290A752 at koanlogic.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Hi,

Adobe changed some security features in recent releases of their Flash  
player that may brake the functionalities of this klapp (I've a  
fast&dirty patch to fix it, drop me a line if you need it). This  
doesn't seem to be your problem if our demo application works as  
expected.

What I would do is:
- install Firebug to debug your javascript code
(http://www.getfirebug.com/ 
); needs Firefox
- keep an eye on KLone log file
- use ngrep (http://ngrep.sourceforge.net/) to watch in realtime the  
data that flows between the browser and the server

bye,
s



On 15/mar/08, at 05:27, Trung, Tran Minh wrote:

> Hi thomas,
> With your demo klapp about status display, it runs well. But when I  
> put
> it into my app, it can not run. It can not connect (always red). So in
> your klapp, how can I debug the connection!?
>
> Thanks a lot
>
> Tran Minh Trung
>
> -----Original Message-----
> From: thomas fossati [mailto:tho at koanlogic.com]
> Sent: Tuesday, February 26, 2008 3:17 PM
> To: Trung, Tran Minh
> Subject: [?? Probable Spam] Re: Status display for device using Klone
> and ajax questions
>
> Hi Trung,
>
> On Feb 26, 2008, at 2:21 AM, Trung, Tran Minh wrote:
>> But in XMLSocket object, it uses Flash. So I wonder that can it run  
>> on
>> device?
>
> the flash object is executed inside the web browser of the client, not
> on the device.
>
> The device is just hosting the flash code (together with its js
> wrapper) onto its embfs: the flash code is actually inert inside the
> device.  When a client connects the flash object is downloaded by the
> browser and executed by the flash plugin.
>
> If it's not clear, ask me more.
>
> ciao, t.
>
> PS: if you think that your doubts/questions/findings would be useful
> to other people you could post them to the klone-users mailing
> list ... ( http://www.koanlogic.com/cgi-bin/mailman/listinfo/klone-
> users ).
>
>
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>




------------------------------

_______________________________________________
Klone-users mailing list
Klone-users at koanlogic.com
http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users


End of Klone-users Digest, Vol 20, Issue 9
******************************************






More information about the klone-users mailing list