Hi Friends
i am using socketwrench control (
www.catalyst.com) and version 2.5(hopefully someone knows abt it)
i setup one vfp app as server and other one as client.following is server socketwrench
properties
WITH THISFORM.hicServer
.AddressFamily = 2
.Protocol = 0 &&IPPROTO_IP
.SocketType = 1 &&SOCK_STREAM
.Binary = .F.
.Blocking(.F.)
.BufferSize = 1024
.LocalPort = 7
.Listen()
lnLastSocket = 0
ENDWITH
following is client socket properties
WITH THISFORM.vipClient
.AddressFamily = 2
.Protocol = 0 &&IPPROTO_IP
.SocketType = 1 &&SOCK_STREAM
.Binary = .F.
.Blocking(.F.)
.BufferSize = 1024
.HostName = "localhost"
.RemotePort = 7
.Action = 2
ENDWITH
am doing following in client app to send some text
LOCAL lcmsg
m.lcmsg = "REFRESH"
WITH frmsession
.vipclient.SendLen = LEN(TRIM(m.lcmsg))
.vipclient.senddata = TRIM(m.lcmsg)
ENDWITH
abv command firiring server sockets read event where i've following code
WITH THIS
.recvlen = datalength && this returns chars 7 which is correct
.sendlen = datalength
.senddata = .recvdata && actual text received
IF !EMPTY(.recvdata) THEN
m.lcmsg=ALLTRIM(UPPER(.recvdata)) && but this lines gives following error
ENDIF
ENDWITH
error :".... socket would block this operation" etc.,
any one has ideas on this please.
i've test sample of this socketwrench which works fine but for some reason even though i'm using exactly same code in our apps i get abv error