Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Closing connection in Winsock's DataArrival OK?

Posted on 1998-12-13
2
Medium Priority
?
165 Views
Last Modified: 2013-11-13
Is it OK to close an opened connection inside the DataArrval() event procedure?

Let Me Explain... (Please read before Commenting/Answering)
0
Comment
Question by:ljaques
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
mwest earned 200 total points
ID: 1449775
Closing from within the DataArrival() sub should be safe..
assuming you use Winsock1.close to do so.
close calls several Winsock functions, WSACLEANUP among others.
This should take care of any still-incomming data to the socket.
0
 

Author Comment

by:ljaques
ID: 1449776
Would you know of any kind of scenerio that would cause some kind of memory leak started by the Winsock control?  I have multi instances up that are using the winsock control btw...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question