[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

disconnect from server

I am writing a DLL in c++ that is called from VB.  I need a function in the dll that forces a disconnect from the server.
0
axnst2
Asked:
axnst2
1 Solution
 
mrwad99Commented:
In standard Winsock programming, a connection is closed via

closesocket (<client socket>);

(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/closesocket_2.asp)

and then you have to clean up winsock by stating

WSACleanup();

would this be suitable ?
0
 
jkrCommented:
What kind of server are you talking about?
0
 
mrwad99Commented:
I am assuming it is some sort of internet server, judging from the questioner's last question (http:Q_21197192.html)
0
Independent Software Vendors: 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!

 
grg99Commented:
What's on the other end?

most servers have a "quit" command, which is the polite way to end a conversation.

0
 
axnst2Author Commented:
Hey mrwad99,  What would go in the ()s The socket number? Or the variable of the TCP client?
0
 
mrwad99Commented:
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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now