Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two Winsock Questions
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Two Winsock Questions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01364305
Message ID:
01364305
Views:
61
Question #1: Will the winsock control handle accepting multiple connection at the same time?

Question #2: I have an application single model form with a Winsock control to listen for tcp traffic on a certain port. Works fine, until the connection is closed by a remote, then it won't receive any more. Below is the code in the winsock control.
******************************
* Winsock.DataArrival
******************************
LPARAMETERS bytestotal
strData = SPACE(256)  && Define string to pass to GetData

This.Object.GetData(@strData)
lcData=TTOC(DATETIME())+[|]+ALLTRIM(strData)+[|]
thisform.ctList.additem(lcData)

******************************
* Winsock Connection Request
******************************
LPARAMETERS requestid
#DEFINE sckClosed 0
If This.Object.State <> sckClosed 
	This.Object.Close
ENDif
*!* Accept the request with the requestID 
*!* parameter.
This.Object.Accept(requestID)
Next
Reply
Map
View

Click here to load this message in the networking platform