Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinSock and VFP
Message
De
09/11/2000 14:50:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
WinSock and VFP
Divers
Thread ID:
00439857
Message ID:
00439857
Vues:
93
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform