Sockets - Broadcast



  • HI !
    Can you give me a short example, how for example 4 PC can chat with the socket api ?
    That means how they can send a broadcast and receive 3 others (every of them only once per frame)

    I just can't do that...

    and:

    Can I create to or more sockets on the same port ?
    And how can I get my own IP (for connections) ?
    Can one socket have more than one connection ?

    Please help me, that would be very nice !!



  • Google for socket chat tcp
    Simon



  • Can I create two or more sockets on the same port ?

    yes, if you set SO_REUSEADDR

    And how can I get my own IP (for connections) ?

    your external IP: http://www.whatismyip.com/
    your internal IP... try typing "ipconfig" into a command prompt.

    Can one socket have more than one connection ?

    nope.


Anmelden zum Antworten