Setting up asynchronous winsocks

This is a discussion on Setting up asynchronous winsocks within the Networking/Device Communication forums, part of the General Programming Boards category; Hello, I have a question about the order of the winsocket setup for an async winsocket server model because I ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    287

    Setting up asynchronous winsocks

    Hello, I have a question about the order of the winsocket setup for an async winsocket server model because I have seen 2 methods for that:

    - one is to create the winsock, fill the sockaddr_in structure, bind the winsock and call the WSAAsyncSelect(),
    - and the other is to create the winsock, call the WSAAsyncSelect(), fill the sockaddr_in structure and finally bind the socket.

    Is there any difference in both methods? Or, is there a wrong setup order?

    Thank's in advance.
    Niara

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    287
    I'll respond myself: there's no problem on doing it in one way or other till the socket hasn't started to 'listen()' because the asynchonous notification works after a client connection.

    If I'm wrong please advise me.

    Niara

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  2. asynchronous and synchronous call between apartments
    By George2 in forum Windows Programming
    Replies: 0
    Last Post: 04-05-2008, 01:22 AM
  3. Winsocks...
    By Kavity in forum C++ Programming
    Replies: 4
    Last Post: 10-21-2002, 04:28 PM
  4. Your favourite fantasy game setting?
    By fry in forum Game Programming
    Replies: 4
    Last Post: 10-16-2002, 06:26 AM
  5. Setting the background color of my main window
    By Garfield in forum Windows Programming
    Replies: 5
    Last Post: 07-06-2002, 11:25 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21