Results 1 to 17 of 17

Thread: Winsock & broadcasting - how?

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    8

    Arrow Winsock & broadcasting - how?

    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

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    8
    ? 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

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5

    Would that work

    Would that work beyond a (local) network?

  6. #6
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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).
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  7. #7
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Not really, as there's good reason not to be.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  8. #8

    Ok then..

    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?)

  9. #9
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  10. #10

    Question Hmm

    Hmm... thats the thing that gets to me..

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

  11. #11
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    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..
    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.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  12. #12
    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?

  13. #13
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Right -- the computer behind the firewall would have to initiate the connection, then you could use that connection.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  14. #14
    Ah i get it.. yeah thats cool... ill have to experiment with some code now.. thanks..

  15. #15
    RobIII
    Guest
    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...

  16. #16
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You could broadcast to a bigger subnet - 192.168.255.255. I personally have my routers configured to drop such packets, though.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  17. #17
    RobIII
    Guest
    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!

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