realbasic-nug
[Top] [All Lists]

Re: sending data with socket

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: sending data with socket
From: Kevin Ballard <kevin at sb dot org>
Date: Fri, 28 Jun 2002 13:58:22 -0400
On 6/28/02 8:38 AM, "Enrico Rosso" <enrico dot rosso at imageline dot it> wrote:

> I'm trying to write an app to control a tcp/ip connected device.
> 
> 1. On the protocol specs they say I have to send the codes as decimals.
> How do I do this with a socket class? is there a way to encode decimals
> on a string and send them as string? (i've tried using the chr command,
> but it doesn't seem to work).
> 
> 2. If the device sends something to me in decimal, will I be able to
> receive it? I mean. will the socket fire the method?

I believe you just Chr() the numbers into a string and send that, and when
you get the DataAvailable event just Asc() the string apart into numbers.

-- 
Kevin Ballard
kevin at sb dot org
Email from Korea or China must go to <kevin dot nb at sb dot org>
http://kevin.sb.org/



<Prev in Thread] Current Thread [Next in Thread>