Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Netlib TCP/IP
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Netlib TCP/IP
Divers
Thread ID:
00486093
Message ID:
00486093
Vues:
41
I am trying to write a "Hello world" program in VFP, using Netlib TCP/IP.
The library comes with a class library and demos for FTP, POP, SMTP, ..., but I wanted to use WINSOCK functions in the library to connect two workstations on a LAN and interactively say "Hello" from one to the other.
The two computers have the TCP/IP loaded and were each given a local IP address.

Here is what I do:
1. Run my testform on each WS - in the load method, it loads the library, starts the TCP/IP engine, and reads the IP address of the WS.

2.Open a socket
thisform.nSocket = N_P_SOCKET(1, 1025)                     && this call is successful
*thisform.nSocket = N_P_SOCKET(1, -1)                      && this call fails
*thisform.nSocket = N_P_SOCKET(1, 1025, thisform.targetIP) && this call fails
3.On one WS issue
=N_P_LISTEN(thisform.nSocket)
=N_P_ACCEPT(thisform.nSocket)
4.On the other WS
=N_P_CONNECT(thisform.nSocket, thisform.TargetIP) && always fails
I am looks like I'll have to get the TCP/IP for Dummies for some basic notions, but until then, can anyone help?

TIA
Doru
Répondre
Fil
Voir

Click here to load this message in the networking platform