Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started 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 ?
-
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....
-
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.
-
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.
-
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.
-
cr="0d0a"x
res = send(socket,cr)
thats a working solution incase anyone else comes across this problem :)
thanks for the help :)