John Larkin said:
Can anybody explain to me, in 9000 words or less, the difference
between UDP and Telnet? I'll be shipping ASCII data strings between a
PC and one of my boxes over 10/100 ethernet, nothing complex.
My PC has Telnet.exe, which lets me test a telnet connection by just
typing, but I don't see a corresponding UDP thingie.
Telnet is a program, rather than a protocol (a terminal emulator to be
precise). You really want to know the difference between UDP and TCP.
UDP is a very basic protocol, without most of the niceties provided by
TCP. If you want to ensure all your data gets there with UDP you have
to write your own protocol on top. It's much easier to use TCP, which
gives some guarantees about your data getting there intact (it
provides checksums, re-tries, re-sorts out of order packets etc.).
Most familiar protocols on the net use TCP (http, ftp, smtp, pop3...).
UDP is used by games and streaming media, where some data loss can be
tolerated and out-of-order packets aren't much use.
The common programming interface to TCP/IP is sockets (Windows sockets
- Winsock, unix sockets...). That deals with all the hassle and you
just get all your data intact, in order at the other end (within
reason, you get errors after too many re-tries of course, but it will
correct for some packet loss and corruption). You can use sockets in
most decent languages (and seamlessly between languages and operating
systems) - VB, Perl, C, Java... whatever you are comfortable with.
Basically, you need a good reason not to use TCP/IP and a socket API.
Tim