Re: Quick Sockets Question

new topic     » goto parent     » topic index » view thread      » older message » newer message

>>When using the WinSock function, WsockCallSocket(), how
>>do you broadcast a message to your local network (or is
>>this not possible using WinSock? I'm just getting into
>>this...) In other words, I have the program running on
>>computers A and B. If I start it up on computer C, how
>>can I signal anyone who's listening that it has been
>>executed?
>
>You need to know the broadcast address for your local area net.  This is
>usually the subnet address bitwise-or'ed with the bitwise-not of the subnet
>mask.  For example, if your subnet mask is 255.255.255.0 and your ip
address
>is 100.100.100.100, the broadcast address is probably 100.100.100.255.
>
>>Also, other than making sure not to use sockets already
>>in use for other functions (like telnet, etc.) does the
>>socket number I choose to use for my program make a
>>difference?
>
>Port numbers above 1000 are generally safe to use.  There are many
>well-known ports that services use.  Best thing to do is look in
>/etc/services on a unix box and find one that isn't used.
>
The ports between 49152 and 65535 are designated as private/dynamic ports.
If you want the whole ugly list, go to http://www.isi.edu/in-
notes/iana/assignments/port-numbers

>
>
>Also, Kat, could you post Brians windows socket example?  (with his
>permission, of course)
>
Actually, it is posted on my site now, and Rob will update the
Contributions page sometime soon.  If you can't wait, the url is
http://2fargon.hypermart.net, and go to the downloads section.  You will
find the server demo, and an older POP3 server that is more complex but
more feature-rich as well.

Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu