Page 1 of 1

whats wrong is this receivedata !?

Posted: Wed Jun 13, 2018 12:22 am
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 

Re: whats wrong is this receivedata !?

Posted: Wed Jun 13, 2018 12:59 am
by plouf
hmm

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

seems to work

Re: whats wrong is this receivedata !?

Posted: Wed Jun 13, 2018 5:55 pm
by airsoftsoftwair
Hard to tell without a reproducable example.

Re: whats wrong is this receivedata !?

Posted: Wed Jun 13, 2018 6:47 pm
by plouf
can set the server up and running , and provide login credential in private if needed..

Re: whats wrong is this receivedata !?

Posted: Thu Jun 14, 2018 6:35 pm
by airsoftsoftwair
Ok, please do so and send me a PM with the code. Then I'll have a look.