Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

VB - Winsock - connect again with remote computer.

I'm successfully connected with a remote computer through winsock in VB 6.0.  I can do anything with that system. But if i close my application and next time i try to connect it doesnt get connects, it may be happen since one connection is already open. I think it should access server_connectionrequest method of remote computer everytime it asks for a new connection. But control doesnt even get into this method.

This is something like a server is always running on remote computer, but i can close my client app whenever i wish, and can then connect with remote whenever i want. I dont want to be connected with remote all the time and i dont want my client application to be remain open.
e.g. run a key log on remote and then exit. in evening get connect again and get detail of key log.
0
tittlejoseph
Asked:
tittlejoseph
1 Solution
 
Alon HirschSoftware Development ManagerCommented:
Hi,

Can you post some sample code ...

Alon
0
 
vpalmuCommented:
Do you call the "Close" method of your winsock component
on Form_Unload procedure ?

On my program I close the socket port with following code:

    1: Winsock_client.Close
    2: Winsock_client.RemotePort = 0

After closing my app I can run it again and a new connetion is always estabilished.
0
 
tittlejosephAuthor Commented:
vpalmu,

i'll check the code and will let you know if it works fine.
0
 
DabasCommented:
Try to change from TCP to UDP.
I had similar problems to you, and that solved it

Dabas
0
 
MILUCommented:
Hello ,
    Download the code from www.geocities.com/milu_7001
This will solve all your problems.

AND

Please see the question

http://www.experts-exchange.com/Programming/Q_20559986.html
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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