Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two Winsock Questions
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Two Winsock Questions
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01364305
Message ID:
01364305
Vues:
60
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)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform