The ClientServer Model


Chapter 29. Networking Basics

This chapter runs through networking fundamentals and explains basic network programming with sockets, URLs, and servlets. It serves as background for the next three chapters on networked games. Chapter 30 is about online chat, the "hello world" of network programming. I will look at three chat variants: one using a client/server model, one employing multicasting, and one illustrating chatting with servlets. Chapter 32 describes a networked version of the FourByFour application, a turn-based game demo in the Java 3D distribution and revisits the Tour3D application in Chapter 18 (the robot walking about a checkerboard landscape) and adds networking to allow multiple users to share the world. I will discuss some of the advanced issues concerning networked virtual environments (NVEs), of which NetTour3D is a simple example.

This chapter provides:

  • Descriptions of the core attributes of network communication

  • Explanations of IP, User Datagram Protocol (UDP), Transmission Control Protocol (TCP), network addresses, and sockets

  • Overviews of the client/server and peer-to-peer models

  • Four client/server applications, illustrating the sequential, threaded, nonblocking multiplexing, and UDP multiplexing techniques

  • A small peer-to-peer application, as an example of UDP multicasting

  • A discussion of the programming problems caused by firewalls, motivating an introduction to URLs and servlets for HTTP tunneling

  • A few words about Java networking with JSSE, RMI, and Jini

    The various programming examples in this chapter can be found in the NetBasics/ directory.




Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net