Solved

Closing connection in Winsock's DataArrival OK?

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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