Closing connection in Winsock's DataArrival OK?

Is it OK to close an opened connection inside the DataArrval() event procedure?

Let Me Explain... (Please read before Commenting/Answering)
ljaquesAsked:
Who is Participating?
 
mwestConnect With a Mentor Commented:
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
 
ljaquesAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.