Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Netlib TCP/IP
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Netlib TCP/IP
Miscellaneous
Thread ID:
00486093
Message ID:
00486093
Views:
42
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
Reply
Map
View

Click here to load this message in the networking platform