Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: on November 25, 2002, 11:08:23 PM

Title: RXSocket.library coding problem...
Post by: on November 25, 2002, 11:08:23 PM
So heres the situation ... I'm trying to code a internet application in a language I know very little of ( ARexx ) using the RXSocket.Library.

The problem is that I've hit a snag using the send() function ....

I can send the data I need perfectly , but the server at the other end requires a newline ( carriage return ? ) to be sent with it before it will act on the data ... Problem is a I can't work out how :(

I've spent all day ripping apart the protocol and can now sucessfully log into the server with a socket tool on windows but alas I can't do anything usefull with the information because Arexx isn't playing ball.


Anyone got an idea on how I could get this working ?
Title: Re: RXSocket.library coding problem...
Post by: catohagen on November 25, 2002, 11:13:47 PM
try sending a cr ?

i think its ascii code 003 or 004 or both, as i remeber
having this trouble with a cnc router program i wrote
using arexx and rxserial or something library....
Title: Re: RXSocket.library coding problem...
Post by: on November 25, 2002, 11:33:05 PM
A CR ( ascii 013 decimal ) does the job in the socket tool :) ... now I just have to find a way to insert it into the arexx code mm :)

How should I go about sending ASCII ? This is my first major Arexx prog and i'm mythed that /n didn't work lol.
Title: Re: RXSocket.library coding problem...
Post by: Doobrey on November 25, 2002, 11:38:34 PM
CR = 10 ( 0A in hex )
 LF = 13  ( 0D )

It depends on what protocol you are coding to/for as to what code you use. Normally you`d just add a CR to the end of the line, but sometimes a CR-LF pair needs to be added.

Title: Re: RXSocket.library coding problem...
Post by: on November 25, 2002, 11:49:39 PM
Probably a really stupid question here .... but how do I do a CR within the RXsocket send() function.

Or how would i do it with say and i'll work from there.
Title: Re: RXSocket.library coding problem...
Post by: on November 25, 2002, 11:56:03 PM
cr="0d0a"x

res = send(socket,cr)

thats a working solution incase anyone else comes across this problem :)

thanks for the help :)