Solved

Closing connection in Winsock's DataArrival OK?

Posted on 1998-12-13
2
161 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 50 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Problem to error 4 82
Send outlook email from VBS Script 2 67
Set WorkSheet  not Working 9 62
Excel Macro update each line based on another worksheet 2 59
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

752 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