whats wrong is this receivedata !?

Find quick help here to get you started with Hollywood
Post Reply
plouf
Posts: 23
Joined: Mon Feb 05, 2018 12:51 am

whats wrong is this receivedata !?

Post by plouf » Wed Jun 13, 2018 12:22 am

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 

plouf
Posts: 23
Joined: Mon Feb 05, 2018 12:51 am

Re: whats wrong is this receivedata !?

Post by plouf » Wed Jun 13, 2018 12:59 am

hmm

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

seems to work

User avatar
airsoftsoftwair
Posts: 2558
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: whats wrong is this receivedata !?

Post by airsoftsoftwair » Wed Jun 13, 2018 5:55 pm

Hard to tell without a reproducable example.

plouf
Posts: 23
Joined: Mon Feb 05, 2018 12:51 am

Re: whats wrong is this receivedata !?

Post by plouf » Wed Jun 13, 2018 6:47 pm

can set the server up and running , and provide login credential in private if needed..

User avatar
airsoftsoftwair
Posts: 2558
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: whats wrong is this receivedata !?

Post by airsoftsoftwair » Thu Jun 14, 2018 6:35 pm

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

Post Reply