Results 1 to 6 of 6

Thread: UDP Server and clients

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    UDP Server and clients

    I've built an application that listen to incoming characters on a serial port and I wish to send them to multiple workstation over our network.

    I tried with mswinsock. I don't see how I can make it. I mean I tought that I only had to send thru a UDP port, the string and I tought that every workstation binded to that same port would be able to get the data.

    It doesn't seem to work.

    I think that every thing turns around usage of remotehost, remoteport, ...

    I've forgot to said that I'm new to that kind of programming

    Thanks

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: UDP Server and clients

    You have to send the data to an address. What address are you sending it to? (UDP, as opposed to TCP, basically means that there's no acknowledgement - you just send the data and don't get anything back.)
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Re: UDP Server and clients

    To bypass my problem I've had a listbox on the server side and when I got a string from the com port, I send it to each address found in my listbox.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: UDP Server and clients

    Try sending to the address x.x.x.255, where x.x.x is the first 3 numbers of the network internal address.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  5. #5
    Lively Member
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    78

    Re: UDP Server and clients

    Is the network internal address the same as the subnetmask?
    To become a PROFESSIONAL,
    Start from SCRATCH...

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: UDP Server and clients

    It better not be. Run Start/Cmd. Type in ipconfig. Look at the IP Address: line. You'll see something like 192.168.1.xxx or 10.200.0.xxx. If you do this from 2 computers, you'll notice that the first three octets (numbers separated by dots) are the same for all computers connected to the same router. Use those 3 numbers with 255 on the end. It might work to send data to all computers on that segment.

    The mask is the thing that determines how many octets (or parts of an octet) are needed to determine a network address. The 0s are needed. IOW, 255.255.255.0 says that, if the address is of the form w.x.y.z, w, x and y are all the same, but we need z to determine the computer. If there are more than 253 computers on that segment (0 and 255 can't be used), the mask might be 255.255.254.0 (for up to 506 computers).
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

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