Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: RXSocket.library coding problem...  (Read 794 times)

0 Members and 1 Guest are viewing this topic.

  • Guest
RXSocket.library coding problem...
« 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 ?
 

Offline catohagen

Re: RXSocket.library coding problem...
« Reply #1 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....
 

  • Guest
Re: RXSocket.library coding problem...
« Reply #2 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.
 

Offline Doobrey

Re: RXSocket.library coding problem...
« Reply #3 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.

On schedule, and suing
 

  • Guest
Re: RXSocket.library coding problem...
« Reply #4 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.
 

  • Guest
Re: RXSocket.library coding problem...
« Reply #5 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 :)