Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinSocket
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00509391
Message ID:
00510016
Views:
17
Hi Benn and Kolya,

The fact that UDP works between two IP addresses is not very relevant for your TCP code.

Using TCP you:
1. must decide the MODE as 'blocking', or 'non-blocking'
2. need a connection between the two IP addresses

If you choose 'blocking' then your winsock function calls will work the same as in VFP i.e. the program stops until the function returns.

In 'non-blocking' mode when you call connect it will imediatly return, regardless of the succes or failure. So, in 'non-blocking' mode you need a loop or a timer, after calling connect, to check the status of the socket or error codes. The same is true for any function call, like send or receive.

HTH
Doru
Previous
Reply
Map
View

Click here to load this message in the networking platform