Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using winsock in VFP5 app
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00504633
Message ID:
00504849
Vues:
20
here in universal thread exist a download center where exist a project with sockets, i download and works fine.

Best Regards

Francisco Morosini
>I have developed the need to communicate directly with a couple of my VFP5 projects via winsock ( using tcpip). I have found quite abit of information for using winsock objects/commands in VB projects, but little in using winsock for VFP. I have gotten hold of a sample winsock project for VB and am in the process of creating the identical project in VFP5.
>
>
>I have two projects called testnet. Testnetc ( client) and Testnets ( server).
>
>I put the winsock object on both forms name as tnListen and tnTalk
>
>On testnets ( server) I have a button that starts the winsock listening on my dev computers ip address port 16161. The code is:
>
>thisform.tnListen.listen()
>
>When I query the state of the tnListen object, I get a return code of 2, listening. I have confirmed that with a drop to a dos box and using netstat /a to see a listening port of 16161 on my machine.
>
>Now comes the problem.
>
>On testnetc I cannot get the state of the tnTalk object to change at all. It always returns a 1(?) closed.
>
>I set the remoteHostPort with thisform.tnTalk.remotHostPort = 16161 and remoteHostIp with thisform.tnTalk.remoteHostIp = "000.000.000.000" ( except my valid ip is there). And then issue a thisform.tnTalk.connect(). Nothing happens when I issue the connect(). No errors, no change in state, nothing. Not even an outgoing attempt is listed in netstat /a.
>
>Now is there anything that I'm missing? Also is there anyone out there who has done this that can give me some pointers.
>
>Thank you very much.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform