Re: Quick Sockets Question

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

On Thu, 2 Dec 1999 17:58:41 -0600, Roderick Jackson <rjackson at CSIWEB.COM>
wrote:

>Hi all,
>
>I'm looking into doing some stuff with WinSockets, and
>have so far looked at Jesus Coseugra's thermometer client
>as an example. Basically, I just want to test things by
>being able to send strings back and forth between several
>computers on our network (TCP/IP-based, I believe,) and I
>think I'll begin by using his code as an example.

I've got some Linux based Euphoria socket code that uses tcp.

>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.

>
>Rod Jackson


Also, Kat, could you post Brians windows socket example?  (with his
permission, of course)

Thanks,

Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu