Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp app acting as a server to a vfp client app
Message
From
07/08/2003 15:28:32
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00817662
Message ID:
00817943
Views:
19
>How do you set up 2 vfp apps so that one is a server and one is a client.
>How does the client application register itself with the server application so the server knows who to communicate with?

You can create a VFP Client-and-Server app using the Winsock TCP controls.

One VFP App acts as a server by instantiating a Winsock control and using it to listen on a given port.

Another VFP App (as client) connects to the Server via its WinSock control and specifying the HostName and Port # of the Host.

When the Server receives a connection request on its "listening port", it creates a connection to that Client by instantiating another Winsock control and "accepting" the connection request. Each connection would add another Winsock control (to an array, for example).

The Client(s) and Server can now "talk" via .SendData() and .GetData()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform