| View previous topic :: View next topic |
| Author |
Message |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue Feb 17, 2004 8:14 pm Post subject: PGWARE VDS INTERNET PROTOCOL PACKAGE QUESTION |
|
|
Any one know if I can run a UDP server on each of a 500 client network.
The reason for this question is this statement in the helpfile (This allows up to 99 UDP-SERVER connections to be opened at the same time.) I'm assuming this means upto 99 servers running on a single system. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Wed Feb 18, 2004 2:58 am Post subject: |
|
|
Hi,
Yes you can run a server on each of the 500 machines. The terminology 99 per machine would allow you to run udp servers from port 1 - 99 on each client machine (a grand total of 49,500 servers based on 500 machines). The number of connections a server can handle is limitless.
It's doubtful any single application would even have that many simultaneous servers opened (99 udp). Even if it were the case you can always open up another instance of the program which allows another 99 servers (note you can't open servers on ports already open).
You mentioned the machines are clients. You should actually just open a single server UDP on the LAN server machine and have each 500 other machines running as client UDP's. I think you are still attempting to send a simultaneous message to all 500 machines? You can do this using the UDP protocol from the single server, it should take a few seconds to send all messages since UDP packets transmit extremely fast. You may even try to broadcast a message by having the UDP server send on IP 255.255.255.255 and see if that works. |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Wed Feb 18, 2004 3:33 am Post subject: |
|
|
| Thanks PGWARE. You answered all my questions even the ones still in my head. I would also like to send a picture along with a message. I dont beleive UDP has this capibility but feel free to correct me. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Wed Feb 18, 2004 5:09 am Post subject: |
|
|
Sure UDP can send files; TCP too. If you have VDS 5 you can use the @binary function to take line by line strings of the file and transmit them over to the clients, where the client program would rebuild the file line by line.
Or you can use the TFTP client and TFTP server to do file transfers the easy way - select a file and tell it to send without messing with the @binary function at all. TFTP is based off the udp protocol but will require another seperate port to be opened to do the file transfers. File transfer with TFTP/TFTP servers work both way (upload/download). |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Feb 22, 2004 7:50 pm Post subject: |
|
|
It is inadvisable to transfer files using UDP, as there will be no warranty that individual
packets arrive. Any packets not arriving would simply be gone and wouldn't be resent.
For streaming video this usually is acceptable as additional frames keep following, but for
just a single bitmap it seems no good. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Feb 23, 2004 12:24 am Post subject: |
|
|
| I think he is transfering files over a LAN thus the speed of a transfer and the reliablity are not necessarily an issue. Over the internet is different situation where problems may occur. |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Mon Feb 23, 2004 12:58 pm Post subject: |
|
|
I will be transferring the graphics over a LAN. I was considering using TCP but wasn’t sure what kind of time that would take vs. UDP. If only seconds not a big deal. Also I was considering using the VDSHTTPD dll on the server side and displaying it in a browser control on the client side. The only issues is security I’m not really that thrilled about leaving a web server alive on the network for everyone to access. Keep the good ideas coming.
Thanks everyone. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Feb 23, 2004 4:55 pm Post subject: |
|
|
TCP vs UDP yes there are just a few seconds difference. Basically each packet sent/received with TCP is checked to make sure the data has arrived in order and is not corrupt.
UDP does no checking at all, thus it's faster but not as reliable when used over the internet. |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue Feb 24, 2004 1:54 pm Post subject: |
|
|
PGWARE,
I tried using 255.255.255.255 on the server to brodcast to all of my clients. But it dosnt seem to work. Basily I'm useing your UDP example scripts and trying to have the server send a responce message back to the client via 255.255.255.255. instead of the @internet(UDP-server,userip,1) function.
Any Ideas |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue Feb 24, 2004 2:02 pm Post subject: |
|
|
PGWARE,
Never mind I figured it out. I set the last 2 octets to .255.255 and that works. |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue Feb 24, 2004 3:50 pm Post subject: |
|
|
PGWARE,
With your examples you have a client and a server. In the above threads you stated that I could use the client UDP for my 500 client machines. and use only one UDP server. Well forgive my ignorance but how.
This is the scenario how I would like my program to work. 500 clients. 1 server. Server is not stationary. Server sends UDP packets out to 206.236.255.255. Clients receive message. Clients now know what the server ip is for the duration of the server being active.
Maybe I’m thinking backwards but I think I need the UDP server to be at each client |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Tue Feb 24, 2004 4:43 pm Post subject: |
|
|
If the server is not stationary you have alot of problems. One the clients never know what the server IP is thus the UDP client connection does not know which ip to listen from.
Even if you setup 500 UDP Servers, then the real server machine would be the single UDP Client. It would need to know the 500 IP addresses of all 500 client machines, connect to them and tell the 500 machines it's IP. Very well possible but more then likely each client machine IP changes as well; no?
If all of your machines IP's continually change then your going to need to run some some sort of external DNS for the server machine, where it goes updates its IP within the dns and all clients can connect to a domain which resolves to the server's IP. This is how the internet works with domains and allows sites to use different IP's while the domain resolves to the correct IP each time. |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue Feb 24, 2004 5:03 pm Post subject: |
|
|
| What I was thinking was is to pull down a list of all machines on the network at the time of the oen "client/server" comes on line. I can do this by quering the NT/2000 domain with net view. That will give me what machines belong on the NT domain. Parse that out and UDP send to the machine name that is resolved through wins/dns. Thats one thought. |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Tue Feb 24, 2004 11:02 pm Post subject: |
|
|
As long as you are able to get all 500 machines IP's then yes you'll probably need to setup those machines all as servers. The single client machine can connect to each and send it the proper data that is required.
This should be relatively fast and well under 1 second to send a message, disconnect and establish connection with another server to start the process over again. |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Thu Feb 26, 2004 12:36 pm Post subject: |
|
|
| when using udp to send a string I'm running into a 292 character (with spaces) limit. Any more the 292 characters the UDP server wont receive the udp packet and I have to restart the UDP server before it will reveive any other packets. Can I increse this limit in any way? |
|
| Back to top |
|
 |
|