whats wrong is this receivedata !?
Posted: 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 ?
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