XML Messages over Socket Connections

This section describes the XML message communication model - where client and server send and receive XML messages over socket communication connections.

Once we know how to work with XML strings and hashes, we can now look at how XML technology can be used in client and server communication.

The most primitive way of using the XML technology in client and server communication is to write a client program and a server program that send and receive XML messages with TCP socket communication over the Internet. The following diagram illustrates how this model works:

Client System                         Server System

             XML    |    Internet    |    XML
Client Prog.<--->TCP|<-------------->|TCP<--->Server Prog.

To learn more about TCP socket communication, see the "Socket Communication" chapter of this book.

A sample server program and a sample client program are presented in sections below to show you how to use this communication model.

Table of Contents

 About This Book

 Perl on Linux Systems

 ActivePerl on Windows Systems

 Data Types: Values and Variables

 Expressions, Operations and Simple Statements

 User Defined Subroutines

 Perl Built-in Debugger

 Name Spaces and Perl Module Files

 Symbolic (or Soft) References

 Hard References - Addresses of Memory Objects

 Objects (or References) and Classes (or Packages)

 Typeglob and Importing Identifiers from Other Packages

 String Built-in Functions and Performance

 File Handles and Data Input/Output

 Open Files in Binary Mode

 Open Directories and Read File Names

 File System Functions and Operations

 Image and Picture Processing

 Using DBM Database Files

 Using MySQL Database Server

 Socket Communication Over the Internet

 XML::Simple Module - XML Parser and Generator

XML Communication Model

XML Messages over Socket Connections

 GameServer.pl - XML Communication Server Example

 GameClient.pl - XML Communication Client Example

 SOAP::Lite - SOAP Server-Client Communication Module

 Perl Programs as IIS Server CGI Scripts

 CGI (Common Gateway Interface)

 XML-RPC - Remote Procedure Call with XML and HTTP

 RPC::XML - Perl Implementation of XML-RPC

 Integrating Perl with Apache Web Server

 CGI.pm Module for Building Web Pages

 LWP::UserAgent and Web Site Testing

 Converting Perl Script to Executable Binary

 Managing Perl Engine and Modules on macOS

 Archived Tutorials


 Full Version in PDF/EPUB