Results 1 to 2 of 2

Thread: Winsock Control /Udp

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    22

    Exclamation

    Hello I'm trying to do some udp basics. I managed at school to make my application send data to another computer with udp. But i had to figure out the computer name and use that as remote host. How can i make it so that the data is sent to the computer where someone is loged on, just by typing in their login name. I saw microsoft's winpopup do it. I wanto make it do that to. For example i put in murfjohn as the remotehost and have it send to the computer he is on. Ofcourse he will be running the other peer aplication i made binded to the appropriate port.

    Another thing is is how can I send to the whole server like winpop and have everyone running the program receive it. Forexample send to KCI-INS if that was the server name.

    If anyone can help me I would appreciate it alot.
    Thanks......

  2. #2
    Addicted Member tonyenkiducx's Avatar
    Join Date
    Oct 2000
    Location
    London England
    Posts
    147
    The name of the machine is purely a reference to an IP address, so you would use there name to point to the IP of the machine, just perform a lookup on the machine name to find the IP, and then use that. Unless you want to get into microsoft networking, which I wouldnt advise, if your new to this .

    As for sending to everyone, when you connect a user up to send messages you will get an index number back from the winsock object, you need to save that somewhere(In an array?), then later, when one person sends a message, itterate through the array, and send to every user/index in there.

    I can provide an example if you need it...

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