Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two Winsock Questions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
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:
01364316
Vues:
35
This message has been marked as the solution to the initial question of the thread.
#1 - No
#2 - Check Winsock is busy long time after disconnecting to remote Thread #843408 Message #843906

>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)
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform