Winsock Questions

vb6 Burundi
  • 14 years ago

    When I should use Winsock control method Bind() ?

    When I should use TCP Protocol and When UDP Protocol?

     How I can ignore receiving data to my server  or accept them when I want?

  • 14 years ago

    Hi cmath

    Use winsock control method Bind() when your program needs to bind to a port in a particular range & that's for security reasons.

    Use TCP when you pass SOCK_STREAM as the second argument to socket().

    Use UDP when you pass SOCK_DGRAM as the second argument to socket()

    You can ignore receiving data to your server or accept them by stopping the Winsock1.LocalPort 'which is the port where all incoming data arrives, including connection requests.

    Check this turorial for more information

    Regards

    DoctorMahdi

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic