Solved

Closing connection in Winsock's DataArrival OK?

Posted on 1998-12-13
2
157 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
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Title # Comments Views Activity
passing a value with stream reader AFTER a ";" 3 74
Notepad++ how to remove delimiter : from beggning of the line? 3 114
Problem to With line 4 63
Excel Automation VBA 19 88
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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

856 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