UDP Chat User Docs

   UDP_Chat is a simple IRC chat type program using UDP. I've written it as a game communication code test/debugger program. You have to have a TCP/IP stack running before you can act as the Server or try to log into a Server. It can act as a Server or a Client- to get the program to act as Server you have to click on the Server button. You can have up to 7 other players online (or up to the total number of players with the `max_number_players' variable set in the code). If it logs into another program (that is acting as Server and has a spare player position) it will be logged in as a Client (as long as it isn't already a Server). You can run up to `max_number_players' UDP_Chat programs locally for testing, and all can log into the program acting as a Server- they all get different port numbers.
   Your host address is printed beside the Localhost button. You have to give this address to the other person through IRC, if your program is going to act as Server (or vice-versa), and then they type the address you give them in the Send To: gadget and hit return. You shouldn't have to change the port number gadget (if you've got two of them running locally, the second one will be bound to a port number one number higher than the first- the port UDP_Chat is bound to is printed up in the top-right corner). When you start a Server it normally binds to port 27272, which is set at the top of the UDP_Chat code. You can log into a Server automatically with AmiComSys, and an Arexx script . Also you could get info from StrICQ, with some extra coding. Also you make an Arexx program to work with an IRC program to automatically log in as well.
   To Disconnect from a game press the disconnect button, or the Close gadget in the window. The Disconnect button will disconnect you from the game if you're a Client, and close down the game and take you out of Server mode if you're the Server. The Close gadget will disconnect you from the game and close the program. If it's a Client it will tell the Server it's disconnecting, and will wait until it receives confirmation from the Server before exiting; if it's the Server it will wait until all players have confirmed the game is closing before disconnecting. There is a disconnect timeout, in case the disconnect protocol fails- ie: a connection is lost etc, and it will disconnect anyway after a certain time.
   Then just type into the Send: gadget and hit return. Your words will be echoed on the screen above and will be sent to any players online. If you can't connect to a host (it will tell you), you won't have your words echoed onscreen, and they won't be sent. After the R and S (received and sent), the packet type is then printed:

RUOPTP- Reliable Unordered Peer_To_Peer packet
RUOCS - Reliable Unordered Client_Server Packet
UNPTP - UnReliable Peer-To-Peer packet
UNCS - UnReliable Client_Server packet

Then after that are packet number, and the player the packet is sent or received from.

   The Ping times to each player are printed out beside each player's number, and you can tell what your player number is- `Me' is printed in place of your Ping time (if you are a Client then the Server is Player 1). `Serv' is printed in the Player 1 position if you're acting as the Server.

Button `1:' pauses the program for 1 second- for simulating lags
Button `2:' pauses the program for 80 seconds- for simulating lags
Button `3:' prints out your current Game System Time
Button `6:' toggles between sending messages Client-Server or Peer-To-Peer (default Client-Server)
Button `7:' toggles between sending Reliable and Unreliable messages (default Reliable)
Button `8:' pauses and unpauses your program- this is for simulating lags or lost links.
The "Localhost:" button is for getting your local IP address if you go online after you've started the program.

Back to UDP Lib Index

(c) 2001-2002 Anton Reinauer - Last updated 31-01-2002