The Network Communication Layer

(Being done by Dennis with Ryan's help)

This module will provide two separate APIs; one for the server, one for the client.

Client API

Command name: What it does:
Join() Finds an appropriate server on the Net and connects to it.

Quit() Disconnects client from the gaming session

Send("string") Send a string of characters to the server connected to by join.
Receive("string") The Client must implement this function and pass it in to the ClientLayer as a constructor argument. The ClientLayer will call this function when it receives a message from the server.

Server API

Command name: What it does:
Create() Creates a new server session for clients to join.
Close() End current server session
Send(PlayerId, "string") Sends an ASCII string to the client referenced by PlayerId.
SendToSelf("string") A loopback call that sends an ASCII string to the server itself.
Broadcast("string") Broadcast an ASCII string to all clients using multicast.
Receive("string") The server must implement this and pass it into the ServerLayer as a constructor argument. The ServerLayer will call this when it receives a message from a client.

Todo List


ben@nospam.cs.washington.edu
Last modified: Fri Apr 17 20:51:01 PDT 1998