General information
Category:
ActiveX controls in VFP
I'm trying to setup a TCP/IP connection between two computers using the standard, Winsock 6.0(?) control. Although this works fine in VB, FoxPro is giving me problems.
FoxPro has no problems sending UDP packets (this is what I ended up using)
FoxPro cannot establish a TCP connection. Here is the code to connect:
WITH THISFORM
IF( .tcpClient1.State <> 0 ) THEN
WAIT WINDOW 'Closing Socket' NOWAIT
.tcpClient1.Close()
ENDIF
IF( not EMPTY( userlist.ipaddress )) THEN
WAIT WINDOW 'Loading Host ' + userlist.ipaddress NOWAIT
.tcpClient1.RemoteHost = userlist.ipaddress
.tcpClient1.RemotePort = 9734
IF( .tcpClient1.State = 0 ) THEN
* WAIT WINDOW 'Connecting...' NOWAIT
.tcpClient1.Connect()
ENDIF
ENDIF
ENDWITH
I have a timer checking .tcpClient1.State every 100ms. The state never
changes from 0 (sckClosed in VB). The above code is nearly identical in
VB, except for the database, and it works just fine.
The server code was based on Linux sockets and simply echoed all messages.
The server had been tested a number of times using Linux and VB, so it's
not the problem.
This is not a big deal. I am just wondering if I was doing something wrong
in VFP to prevent it from connecting properly.
Thanks all.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only