I now use the Catalyst SocketWrench Control from www.catalyst.com to broadcast over a network (ie. sending packages without giving them a destination). Is this also possible with Winsock (OCX or API)?
Please help. Thank you!
Bram
Printable View
I now use the Catalyst SocketWrench Control from www.catalyst.com to broadcast over a network (ie. sending packages without giving them a destination). Is this also possible with Winsock (OCX or API)?
Please help. Thank you!
Bram
is this you try to do...
Send a message from Server to all client? If yes, try the Net Send Command with the help of ADSI object.
? No I want to make a game over network, but it must be fast, so I decided to use broadcasting. It worked with the SocketWrench control, but I do not want to use that anymore (needs to be distributed with the game and needs registration). I just needed to do the same, but with Winsock
IP address ending in 255 are broadcast addresses.
Ex:
ping 10.23.45.255 - broadcast ping to 10.23.45.1 through 10.23.45.254, whether devices respond is another question, Windows doesn't respond to a broadcast ping, and you'd need a packet sniffer to really see the results.
Use something like 10.23.255.255 for a class B or 10.255.255.255 for a class A.
Would that work beyond a (local) network?
No, routers shouldn't be routing broadcast packets. (although some were - and either the smurf or the fraggle hacks exploited it - I can't remember which).
Not really, as there's good reason not to be.
Different question...
How would someone say a client be able to connect to my computer which is behind a firewall and on a network? (Mirables ICQs managed to do it?)
You can't unless you configure the firewall for it.
If ICQ works like Napster did behind a firewall, then because outbound connections are allowed, the client connects to a server for the data tranfer, or directly connects to the other computer if that one will allow connections.
Hmm... thats the thing that gets to me.. :D
if i make a connection to say a server right... say ICQ or Napster.. how would they be able to connect back to me ... if i am behind a firewall and a network.. ? I mean.. my ICQ works fine... and Napster worked on here before also fine.. hmm..
even if i would have to make a server.. that wouldnt be a problem because i would be able to implement that into the client.. But then i am still stuck with being able to communicate back into the system from the other end..
You already connected to them, it's already established, so there's no need for them to have to connect back to you. On a lower level, there's a bit set in the packets that says a connection has already been established, and the firewalls let those packets thru.Quote:
if i make a connection to say a server right... say ICQ or Napster.. how would they be able to connect back to me ... if i am behind a firewall and a network.. ? I mean.. my ICQ works fine... and Napster worked on here before also fine.. hmm..
So if i would make an application (server) that connects up to a client... right.. (server behind the firewall)... then the client should be able to connect back to the server... by using the same connection?
Right -- the computer behind the firewall would have to initiate the connection, then you could use that connection.
Ah i get it.. yeah thats cool... ill have to experiment with some code now.. thanks..
I have two networks (192.168.0.x and 192.168.1.x). My app is on the 0.x network and can send to all in the same network by sending to 192.168.0.255 or 224.0.0.1
But how can it also send to 192.168.1.x ? I've tried 192.168.1.255 and 224.0.1.1 but that won't work...
Any ideas how to send multicast packages over 2 networks? Do I have to change subnets or anything like that?
So in short:
* App sends multicast packages
* I want Apps on 192.168.0.x and Apps on 192.168.1.x to receive them...
You could broadcast to a bigger subnet - 192.168.255.255. I personally have my routers configured to drop such packets, though.
Thanx...
Somehow I knew it when I saw your solution... You're right, but it doesn't work for me...
I can ping the computer, but the multicast is not received... Weird he?
I'll go check my router and tweak it if necessary....
Thanx again for the response!