whats wrong is this receivedata !?

Find quick help here to get you started with Hollywood
Post Reply
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

whats wrong is this receivedata !?

Post by plouf »

There is a server the server reads your data you send and replies them back is same connection

if i connect via telnet every time i send xyz bytes xyz displayed back !

however the following code do NOT read back data for some reason ? what i am doing wrong here ?

Code: Select all

OpenConnection(1, "192.168.1.71", 500)

landata,count,Done = ReceiveData(1,#RECEIVELINE)
NPrint("Data "..landata.." -bytes "..count.. " -done "..Done) 

count = SendData(1,"xxxxxxxx12345678")
NPrint(" Send "..count.." of bytes")

landata,count,done = ReceiveData(1,#RECEIVEBYTES,16)
NPrint("Data "..landata.." -bytes "..count.. " -done "..Done) 

CloseConnection(1)

Repeat
	WaitEvent()
Until 0 
Christos
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: whats wrong is this receivedata !?

Post by plouf »

hmm

SendData(1,"xxxxxxxx12345678\10\13")

seems to work
Christos
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: whats wrong is this receivedata !?

Post by airsoftsoftwair »

Hard to tell without a reproducable example.
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: whats wrong is this receivedata !?

Post by plouf »

can set the server up and running , and provide login credential in private if needed..
Christos
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: whats wrong is this receivedata !?

Post by airsoftsoftwair »

Ok, please do so and send me a PM with the code. Then I'll have a look.
Post Reply