Results 1 to 3 of 3

Thread: Winsock blaster - does one exxist?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Winsock blaster - does one exxist?

    Hi,

    I was reading about a control for UDP and it said it has a method to blast a message to everyone at once. Does anyone know of a control for TCP that will do that for all connected users instead of looping through and sending the message to each?

    I was looking into UDP cause it seemed faster but looks like I may miss some packets and for an online game that may not be too good.

    Thanks

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Winsock blaster - does one exxist?

    You can use the Winsock Control for either TCP or UDP.
    Only UDP can do a broadcast (sending to all at once), since UDP doesn't care if anyone actually receives anything.
    TCP ensures that each message is being received at the receiving end, and due to that there can't be a real broadcast.
    You either have to use an UDP-broadcast or use a loop that sends all messages via TCP.
    BTW: I'm using both, UDP for messages that need to be sent to all, however a missing package is no problem (i.e. The actual situation, if one message is lost, the next contains it all again).TCP for all messages which have to be received (i.e. All Action-messages).
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Winsock blaster - does one exxist?

    Most games use UDP for things like keeping track of the movement of an object (current location). In cases like that, losing a packet isn't that big a deal. Another packet will be along soon enough, and the worst that will happen will be that an object "stutters". Losing packets isn't all that common in LAN work, either.

    However, if you are using UDP, and you have a really critical message, just have the receiver echo the message back to the sender (when the receiver gets the message, have them send the same message right back). Then the sender keeps re-sending until it receives the echo. Thus, the echo acts as an acknowledgement of the original message.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width