Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinSock and VFP
Message
From
09/11/2000 14:50:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
WinSock and VFP
Miscellaneous
Thread ID:
00439857
Message ID:
00439857
Views:
90
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
Map
View

Click here to load this message in the networking platform