PDA

Click to See Complete Forum and Search --> : Winsock Control /Udp


Acid
Oct 20th, 2000, 04:18 PM
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......

tonyenkiducx
Oct 23rd, 2000, 04:31 AM
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...