Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

VB6 Winsock Port Listen Question

Visual Basic 4 / 5 / 6

  • Please log in to reply
2 replies to this topic

#1 Eddie12390

Eddie12390

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 20 September 2008 - 04:27 PM

I am creating a program in visual basic 6, the only problem is that it changes ports and sockets each time I try to connect, thus I can't get it to work.

From what I have read, Winsock only listens on one port, is this true, and if so, is there a way around it?
  • 0

#2 Colanth

Colanth

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 165 posts
  • Location:Fayetteville, NC, USA
  • Programming Language:PHP, (Visual) Basic, JavaScript, Visual Basic .NET, Pascal, Logo, Assembly, VBScript, Others

Posted 22 September 2012 - 07:24 PM

The program will listen on the port you set it to listen on. But the program shouldn't change that port unless you're not specifying a port - which you have to do. (That's the port the client - the other end - has to connect on.)
  • 0

#3 neil

neil

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 373 posts
  • Location:Philadelphia
  • Programming Language:C++, Perl, Bash
  • Learning:C, Java, C++, Python, JavaScript, Perl, Bash, Others

Posted 22 September 2012 - 08:16 PM

You could try multithreading.
I do not know if vb6 supports this but you could research into it :)

i just found this.
Maybe it might help you.
http://www.xtremevbt....php?t=313258#_

edit:
also this would be of help
http://forums.codegu...reading-Winsock
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download