100% found this document useful (2 votes)
23 views

Pro NET 1 1 Network Programming 2nd Edition Christian Nagel instant download

The document provides information about the book 'Pro .NET 1.1 Network Programming, Second Edition' by Christian Nagel and others, detailing its contents and structure. It covers various networking concepts, protocols, and programming techniques in .NET, including socket programming, TCP, UDP, and cryptography. The book is available for download in multiple formats from the specified website.

Uploaded by

naieemrumia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
23 views

Pro NET 1 1 Network Programming 2nd Edition Christian Nagel instant download

The document provides information about the book 'Pro .NET 1.1 Network Programming, Second Edition' by Christian Nagel and others, detailing its contents and structure. It covers various networking concepts, protocols, and programming techniques in .NET, including socket programming, TCP, UDP, and cryptography. The book is available for download in multiple formats from the specified website.

Uploaded by

naieemrumia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Pro NET 1 1 Network Programming 2nd Edition

Christian Nagel pdf download

https://ebookname.com/product/pro-net-1-1-network-
programming-2nd-edition-christian-nagel/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Professional C 6 and NET Core 1 0 1st Edition Christian


Nagel

https://ebookname.com/product/professional-c-6-and-net-
core-1-0-1st-edition-christian-nagel/

How to Code NET Tips and Tricks for Coding NET 1 1 and
NET 2 0 Applications Effectively 1st Edition Christian
Gross

https://ebookname.com/product/how-to-code-net-tips-and-tricks-
for-coding-net-1-1-and-net-2-0-applications-effectively-1st-
edition-christian-gross/

Pro ASP NET SignalR Real Time Communication in NET with


SignalR 2 1 1st Edition Keyvan Nayyeri

https://ebookname.com/product/pro-asp-net-signalr-real-time-
communication-in-net-with-signalr-2-1-1st-edition-keyvan-nayyeri/

Financial Analysis A Controller s Guide 2nd Edition


Steven M. Bragg

https://ebookname.com/product/financial-analysis-a-controller-s-
guide-2nd-edition-steven-m-bragg/
Benjamin Franklin Pennsylvania and the First Nations
The Treaties Of 1736 62 1st Edition Susan Kalter

https://ebookname.com/product/benjamin-franklin-pennsylvania-and-
the-first-nations-the-treaties-of-1736-62-1st-edition-susan-
kalter/

Drug Treatment What Works 1st Edition Philip Bean

https://ebookname.com/product/drug-treatment-what-works-1st-
edition-philip-bean/

The Everett Interpretation of Quantum Mechanics


Collected Works 1955 1980 with Commentary Jeffrey A.
Barrett (Editor)

https://ebookname.com/product/the-everett-interpretation-of-
quantum-mechanics-collected-works-1955-1980-with-commentary-
jeffrey-a-barrett-editor/

Algorithmic aspects of graph connectivity 1st Edition


Hiroshi Nagamochi

https://ebookname.com/product/algorithmic-aspects-of-graph-
connectivity-1st-edition-hiroshi-nagamochi/

Users and Abusers of Psychiatry A Critical Look at


Psychiatric Practice 1st Edition Lucy Johnstone

https://ebookname.com/product/users-and-abusers-of-psychiatry-a-
critical-look-at-psychiatric-practice-1st-edition-lucy-johnstone/
Aletheia Astrology in the New Aeon for Thelemites J.
Edward [ Jerry ] Cornelius

https://ebookname.com/product/aletheia-astrology-in-the-new-aeon-
for-thelemites-j-edward-jerry-cornelius/
Pro .NET 1.1
Network Programming
Second Edition
CHRISTIAN NAGEL, AJIT MUNGALE, VINOD KUMAR,
NAUMAN LAGHARI, ANDREW KROWC2YK,
TIM PARKER, SRINIVASA SIVAKUMAR,
AND ALEXANDRU SERBAN

APress Media, LLC


Pro .NET 1.1 Network Programming, Second Edition
Copyright © 2004 by Christian Nagel, Ajit Mungale, Vinod Kumar, Nauman Laghari, Andrew Krowczyk,
Tim Parker, Srinivasa Sivakumar, and Alexandru Serban
Originally published by Apress in 2004

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN 978-1-59059-345-5 ISBN 978-1-4302-0660-6 (eBook)
DOI 10.1007/978-1-4302-0660-6
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Dominic Shakeshaft
Technical Reviewer: Alexandru Serban
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason
Gilmore, Chris Mills, Dominic Shakeshaft, Jim Sumser
Project Manager: Sofia Marchant
Copy Edit Manager: Nicole LeClerc
Copy Editors: Marilyn Smith, Ami Knox
Production Manager: Kari Brooks
Production Editor: Janet Vail
Compositor and Artist: Diana Van Wmkle
Proofreader: Greg Teague
Indexer: Brenda Miller
Cover Designer: Kurt Krames
Manufacturing Manager: Tom Debolski

The information in this book is distributed on an "as is" basis, without warranty. Although every precau-
tion has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liabil-
ity to any person or entity with respect to any loss or damage caused or alleged to be caused directly or
indirectly by the information contained in this work.
The source code for this book is available to readers at http: I lwww. a press. com in the Downloads section.
You will need to answer questions pertaining to this book in order to successfully download the code.
Contents at a Glance

About the Authors ................................................................. xv


About the Technical Reviewer ...................................................... xvii
Introduction ...................................................................... xix

HAPTER 1 Networking Concepts and Protocols ............................. 1


HAPTER 2 Streams in .NET ............................................... 45
CHAPTER 3 Network Programming in .NET ................................. 85
CHAPTER 4 Socket Programming in .NET .................................. 121
HAPTER 5 Raw Socket Programming .................................... 163
HAPTER 6 1Pv6 .......................................................... 189
TCP .......................................................... 213
CHAPTER 8 UDP .......................................................... 263
HAPTER 9 Multicast Sockets ............................................ 295
CHAPTER 10 HTIP ......................................................... 345
CHAPTER 11 E-mail Protocols .............................................. 393
CHAPTER 12 Cryptography in .NET ......................................... 431
CHAPTER 13 Authentication Protocols ...................................... 475
INDEX ....................................................................... 501

IIi
Contents

About the Authors ................................................................. xv


About the Technical Reviewer ...................................................... xvii
Introduction ...................................................................... xix

HAPTER 1 Networking Concepts and Protocols ....................... 1


The Physical Network ............................................. 2
WAN Lines .................................................. 2
Ethernet .................................................... 3
Physical Components ........................................ 5
The Layered OSI Model .......................................... 11
Layer 1: Physical Layer ...................................... 13
Layer 2: Data Link Layer. .................................... 13
Layer 3: Network Layer. ..................................... 14
Layer 4: Transport Layer ..................................... 14
Layer 5: Session Layer ...................................... 15
Layer 6: Presentation Layer .................................. 15
Layer 7: Application Layer ................................... 15
Network Protocols ............................................... 16
Basic Protocols ............................................. 16
Internet Protocols ........................................... 27
E-mail Protocols ............................................ 32
Other Application Protocols .................................. 33
Sockets ........................................................ 34
Domain Names ................................................. 35
Whois Service .............................................. 36
Domain Name Servers ...................................... 36
The Internet .................................................... 37
lntranets and Extranets ...................................... 38
Firewalls .................................................. 38
Web Proxies ............................................... 39
XML Web Services .......................................... 40
.NET Remoting .................................................. 41
Messaging ..................................................... 42
Other Ways to Access Network Objects ............................. 43
Internet Organizations and Standards .............................. 43
Summary ...................................................... 44 v
CHAPTER 2 Streams in .NET ............................................. 45
Streams in .NET ................................................. 45
Synchronous and Asynchronous 1/0 ........................... 45
Stream Class............................................... 46
FileStream Class ........................................... 50
Reading and Writing with the FileStream Class ................. 53
BufferedStream Class ....................................... 57
MemoryStream Class ....................................... 57
NetworkStream Class ....................................... 58
CryptoStream Class ......................................... 61
Stream Manipulation ............................................. 64
Encoding String Data........................................ 64
Binary Files ................................................ 67
TextReader ................................................ 70
TextWriter ................................................. 73
Serialization .................................................... 75
Serializing into XML Format .................................. 75
Serializing with Formatter Objects ............................ 78
Summary ...................................................... 83

CHAPTER 3 Network Programming in .NET ............................. 85


System.Net Classes Overview..................................... 85
Name Lookup .............................................. 85
IP Addresses ............................................... 86
Authentication and Authorization ............................. 86
Requests and Responses .................................... 87
Connection Management .................................... 87
Cookies ................................................... 88
Proxy Server ............................................... 89
Sockets ................................................... 89
Working with URis ............................................... 89
Uri Class .................................................. 91
Properties of the Uri Class ................................... 92
Modifying URis with the UriBuilder Class ....................... 93
Absolute and Relative URis................................... 94
IP Addresses .................................................... 95
Predefined Addresses ....................................... 96
Host or Network Byte Order .................................. 96
CC TfN"TS vii

Dns Class ...................................................... 97


Resolving a Name to an IP Address ........................... 97
How Is an IP Address Resolved? .............................. 99
Resolving the IP Address Asynchronously ..................... 1oo
Requests and Responses ........................................ 102
WebRequest and WebResponse ............................. 102
Pluggable Protocols ........................................ 105
FileWebRequest and FileWebResponse ....................... 106
Connection Pooling ........................................ 109
Using a Web Proxy.............................................. 109
Web Proxy Class ........................................... 11 o
Default Web Proxy ......................................... 111
Changing the Web Proxy for Specific Requests ................ 111
Authentication ................................................. 112
Permissions ............................................ 112
DnsPermission ............................................ 113
WebPermission ............................................ 113
SocketPermission ......................................... 113
Using Permission Attributes ................................. 113
Configuring Permissions .................................... 116
Summary ..................................................... 119

CHAPTER 4 Socket Programming in .NET .............................. 121


An Overview of Sockets ......................................... 121
SocketTypes .............................................. 122
Sockets and Ports ......................................... 123
Working with Sockets in .NET .................................... 124
Creating a TCP Stream Socket Application .................... 126
Managing Exceptions with System.Net.Sockets ............... 135
Setting and Retrieving Socket Options ........................ 137
Asynchronous Programming ..................................... 140
Creating an Asynchronous Client Application .................. 141
Creating an Asynchronous Server Application ................. 150
Socket Permissions ............................................. 154
Using Imperative Security................................... 155
Using Declarative Security .................................. 159
Summary ..................................................... 161
viii CONTENTS

IEHAPTER 5 Raw Socket Programming ................................ 163


The ICMP Protocol. ............................................. 163
ICMP Packet Format ....................................... 164
ICMP PacketTypes......................................... 165
Using Raw Sockets ........................................ 165
Creating an ICMP Class-Formatting ICMP Packets ............ 168
Using ICMP to Create a Tracing Application ................... 176
SNMP ......................................................... 179
Impending SNMP .......................................... 179
SNMP Commands ......................................... 180
Community Names ........................................ 180
Common Management Information Base (MIB) ................ 181
SNMP Packets ............................................ 181
SMTP Class ............................................... 182
Summary ..................................................... 187

IEIHAPTER 6 1Pv6 ......................................................... 189


The Need for a New Protocol ..................................... 189
Features of 1Pv6 ................................................ 190
The 1Pv6 Header ........................................... 191
1Pv6 Addressing ........................................... 192
Installing 1Pv6 on Windows Server 2003 ........................... 195
Installing 1Pv6 with the netsh Command ...................... 195
Installing 1Pv6 through Local Area Connection Properties ....... 196
Verifying 1Pv6 Configuration ................................. 197
.NET Support for 1Pv6 ........................................... 197
Enabling 1Pv6 in Machine.config ............................. 198
Reviewing IPAddress Class Support for 1Pv6 ................... 198
Creating an 1Pv6-Based Client/Server Application .............. 203
Using the 1Pv6Multicast0ption Class ......................... 207
Summary ..................................................... 211

CHAPTER 7 TCP ......................................................... . 213


An Overview ofTCP ............................................. 213
Encapsulation ............................................. 213
TCP Headers .............................................. 214
TCP Connections .......................................... 215
TCP Operations ............................................ 216
cornf~ns lx

.NET Support for TCP ........................................... 218


The TcpCiient Class ........................................ 218
Building a Simple E-mail Client Application ................... 223
Creating an FTP Client ..................................... 229
The Tcplistener Class ...................................... 245
Building a Multithreaded Client/Server Application ............. 247
.NET Remoting ................................................. 252
How Remoting Works ...................................... 253
Building a Simple Remoting Application ...................... 255
Creating a Client-Activated Remote Object .................... 260
Summary ..................................................... 261

CHAPTER 8 UOP ......................................................... 263


An Overview of UDP ............................................ 263
UDP Datagrams ........................................... 264
UDP Ports ................................................ 264
How UDP Works ........................................... 265
Differences Between TCP and UDP ........................... 266
.NET Support for UDP ........................................... 269
The UdpCiient Class........................................ 269
Creating a Chat Application Using UDP ....................... 281
Building a UDP File Transfer Application ...................... 285
Coding the File Server ...................................... 285
Coding the File Receiver .................................... 288
Broadcasting .............................................. 291
Higher-Level UDP-Based Protocols ............................... 292
Summary ..................................................... 293

CHAPTER 9 Multicast Sockets .......................................... 295


Unicasts, Broadcasts, and Multicasts ............................. 295
Unicast Addresses ......................................... 296
Broadcast Addresses ....................................... 296
Multicast Addresses ....................................... 296
Application Models with Multicasting ............................. 297
Many-to-Many Applications ................................. 297
One-to-Many Applications .................................. 298
Architecture of Multicast Sockets ................................. 298
IGMP ..................................................... 299
Multicast Address Allocation ................................ 301
x CONTENTS

Routing ................................................... 303


Scoping .................................................. 305
Routing Protocols .......................................... 305
Scalability ................................................ 306
Reliability ................................................. 306
Security .................................................. 306
Using Multicast Sockets with .NET................................ 307
Multicast Sender Applications ............................... 307
Multicast Receiver Applications .............................. 308
Creating a Chat Application ...................................... 309
Setting Up the User Interface ................................ 309
Creating the Configuration File .............................. 311
Joining the Multicast Group ................................. 313
Receiving Multicast Messages .............................. 314
Sending Multicast Messages ................................ 315
Dropping the Multicast Membership ......................... 316
Starting the Chat Application ................................ 316
Creating a Picture Show Application .............................. 317
Creating a Picture Protocol .................................. 318
Building the Picture Show Server ............................ 324
Creating the Picture Show Client ............................ 335
Starting the Picture Show ................................... 341
Summary ..................................................... 343

CHAPTER 10 HTTP ........................................................ 345


An Overview of HTIP ........................................... 345
HTIP Headers ............................................. 347
HTIP Requests ............................................ 348
HTIP Responses .......................................... 351
Using HTIP with .NET ........................................... 352
The HttpWebRequest and HttpWebResponse Classes ........... 352
Posting Data .............................................. 357
HTIP Chunking ............................................ 358
HTIP Pipelining ........................................... 359
HTIP Keep-Alive Connections ............................... 360
HTIP Connection Management .............................. 361
The WebCiient Class ....................................... 362
Authentication ............................................ 368
Proxy Support ............................................. 370
ICONTt~n xi

Reading and Writing Cookies..................................... 371


Writing Cookies on the Client. ............................... 371
Reading Cookies on the Client. .............................. 373
Maintaining State with Cookies .............................. 374
Creating an HTIP Server with ASP. NET Support .................... 375
Storing the Server Configuration Information .................. 376
Coding the Basic Server .................................... 377
Hosting ASP. NET Applications Outside liS ..................... 385
Testing the Server ......................................... 386
Building an HTIP Remoting Application ........................... 387
Registering the HTIP Channel ............................... 388
Defining the Remote Class .................................. 388
Creating the Remote Server Application ...................... 389
Creating the Remote Client Application ....................... 390
Summary ..................................................... 391

CHAPTER 11 E-mail Protocols ........................................... 393


How E-mail Works .............................................. 393
Sending E-mail ................................................ 395
SMTP Sessions ............................................ 395
SMTP Reply Codes ......................................... 398
E-mail Message Structure ....................................... 399
Received Headers ......................................... 400
E-mail Attachments (MIME) ................................. 402
Retrieving Client/Server E-mail ................................... 404
POP3 .................................................... 405
IMAP ..................................................... 407
.NET Support for E-Mail Exchange ................................ 409
The System.Web.Mail Namespace ........................... 409
Constructing a MaiiMessage Object. ......................... 410
Adding an Attachment. ..................................... 411
Sending an E-mail Message ................................ 412
Creating an SMTP Mail Application ............................... 412
Creating a POP3 Application ..................................... 414
Creating a POP3 C# Class .................................. 414
Using the POP3 Class in an Application ....................... 420
Building an NNTP Application .................................... 422
Creating an NNTP Class in C# ............................... 423
Using the NNTP Class in an Application ....................... 428
Summary ..................................................... 429
xU CONTENTS

IEHAPTER 12 Cryptography in .NET ...................................... 431


History of Cryptography ......................................... 431
What Is Cryptography? .......................................... 432
Why Use Cryptography? ......................................... 434
Concepts of Cryptography .................................. 434
Cryptographic Algorithms ........................................ 435
Symmetric Algorithms ...................................... 436
Asymmetric Algorithms ..................................... 437
Message Digest Algorithms ................................. 439
Digital Signatures .......................................... 440
Cryptography Terminology ....................................... 441
Block Ciphers and Stream Ciphers ........................... 441
Padding .................................................. 441
Modes ................................................... 443
The System.Security.Cryptography Namespace .................... 444
Cryptography Class Hierarchy ............................... 444
Hashing with .NET .............................................. 445
The HashAigorithm Class ................................... 446
Symmetric Transformation with .NET ............................. 453
The SymmetricAigorithm Class .............................. 453
Using Other Symmetric Algorithms ........................... 458
Asymmetric Transformation with .NET ............................ 459
The AsymmetricAigorithm Class ............................. 459
Using the RSA Algorithm .................................... 460
Loading the Public and Private Keys ......................... 463
Reading an X509 Certificate ..................................... 466
Cryptography and Network Programming .......................... 468
Summary ..................................................... 474

~ CHAPTER 13 Authentication Protocols .................................. 475


Authentication and Authorization ................................. 475
NTLM ......................................................... 476
How Challenge/Response Authentication Works ............... 476
NTLM Development ........................................ 476
Kerberos ...................................................... 480
How Key-Based Authentication Works ........................ 480
The Kerberos Authentication Process ......................... 483
Windows 2000 Implementation of Kerberos ................... 486
CONTENTS xiii

Windows Authentication ......................................... 487


An Overview of Windows Authentication Methods .............. 487
Windows 2000 Security Support Provider Interface (SSPI) ....... 488
.NET Security .................................................. 493
The .NET Code Access Security Policy ........................ 493
.NET Resource Security .................................... 494
.NET Role-Based Security ................................... 498
Client Authentication Handling ............................... 498
Impersonation ............................................. 499
Summary ..................................................... 500

.NDEX ......................................................... .............. 501


About the Technical Reviewer

CHRISTIAN NAGEL has about 20 years of experience as developer and software architect. He is
working as an independent trainer and consultant offering courses, seminars, and coaching,
based on Microsoft .NET technologies.
Christian started his computing career with PDP 11 and VAX/VMS platforms, covering a
variety oflanguages and platforms. Since 2000 he has been working with .NET and C# devel-
oping and architecting distributed solutions. Certified as a Microsoft Certified Trainer (MCT),
Microsoft Certified Solution Developer (MCSD), Microsoft Certified System Engineer (MCSE),
and MSF (Microsoft Solutions Framework) Practitioner, he furthermore loves writing and
enjoys a good reputation as an author of several .NET books, such as Professional C#, Profes-
sional.NET Network Programming, C# Web Services, and Enterprise Services with the .NET
Framework. In his role as Microsoft Regional Director and MVP for Visual C#, he speaks at
international conferences. Christian is also known as Regional Manager of INETA Europe
(lnternational.NET User Group Association), and since 2004 he has become an associate of
Thinktecture, a team of experts who offer consultancy and training about .NET technologies.
You can contact Christian via his web site at http: I IWVM. christiannagel. com.

~.JIT MUNGALE has extensive experience with Microsoft technologies and has worked with
almost all languages and technologies. He also has experience with IBM products, including
IBM WebSphere and MQ. He is author of a couple other books and published articles on
Microsoft .NET.

ANDREW KROWClYK is a software architect and MCSD.NET working in the Chicago area.
He currently works heavily with cutting edge .NET technologies. Andrew's area of expertise
includes Enterprise applications and theoretical computer science. He also works as an
adjunct faculty member at Elmhurst College. He can be reached at KROWCZYK@I -NETWAY. COM.

VI NOD KUMAR is a Microsoft MVP from Chennai, India. He has authored many books on
Microsoft technologies, such as MOBILE APPLICATION DEVELOPMENT USING • NET and Planning,
Implementing, and Maintaining a Windows Server 2003 Active Directory Infrastructure. He also
owns a site named .NET Force (HTTP: I IWWW. DOTNETFORCE. COM). The site provides the latest
information and publishes original articles on .NET technology. He can be reached at
[email protected].

S. SRINIVASA SIVAKUMAR works as a solution architect for Microsoft Corporation India and is
an author and speaker specializing in Web and mobile solutions using .NET technologies.

XV
About the Technical Reviewer

ALEXANDRU SERBAN is a software engineer for MMC Softlabs, building enterprise management
information systems for large, geographically distributed companies.
Alexandru started his addiction to computers when he first saw video game machines. He
started his programming career at the age of 9, when he bought his first Z80 processor-based
computer and started learning BASIC. He then moved toward languages like Visual Basic, C,
and C++. He graduated in computer science and automatic systems. Now, he specializes in
network communications, and he is very enthusiastic about C# and the .NET Framework,
which he strongly believes is set to revolutionize programming.
In his free time, he likes to drive and travel, in the summer to the sea, and in the winter to
the mountains, where he hits the slopes with a snowboard.

xvii
Introduction

Network programming is one of the core tasks of enterprise-level development-the need


for disparate computers to communicate efficiently and securely, whether within the same
building, or across the world, remains fundamental to the success of many systems. With the
.NET 1.1 Framework comes a new set of classes for tackling networking tasks.
These classes make common network programming tasks very easy and straightforward,
as they provide a layered, extensible, and managed implementation of Internet services that
can be integrated into your applications.
After reading this book, you will be a confident .NET 1.1 network programmer who
understands all the underlying protocols. The current set of protocols supported by .NET 1.1
classes is limited to the transport-level protocols TCP and UDP, and the application-level pro-
tocols HTTP and SMTP. In this book, we provide not only full coverage of these classes, but
also examples of implementing application-level protocols in .NET-so this book will be vital
reading for anyone who needs to use a protocol that isn't currently supported by .NET 1.1, as
well as for anyone who wants to get to grips with the predefmed protocols.

Who Is This Book For?


You do not need any prior knowledge of network programming to read this book, because you
will learn the basic and then more advanced networking concepts as you follow each chapter.
You may already be familiar with network programming from another environment, of course-
in which case, you will still find the pace strong enough for the book to prove valuable.
We're going to assume you have a working knowledge of C# to read the examples and
code solutions we provide. Sometimes we will also present techniques that are specifically
suitable to the C# language.

What Is in This Book?


We begin this book by introducing you to some of the basic concepts and protocols of net-
working in Chapter 1. Whatever your requirements from network programming-whether
you plan to develop server applications running as Windows Services offering data for clients
using a custom protocol, whether you want to write client applications that request data from
web servers, or whether you want to create multicasting applications or applications using
mailing functionality-this chapter is your first port of call.
We begin Chapter 1 with a look at the physical network, and the hardware used in
network communication. We will start with an introduction to the types of networks in use
today, like local area networks (LANs), wide area networks (WANs), and metropolitan area
networks (MANs); and network architectures and network devices, such as network interface
cards (NICs), routers, hubs, and bridges. Then, we'll take a look at the OSI seven-layer model,
and how the TCP liP protocol suite fits into the OSI layers. After that, we introduce you to the xlx
xx IIINTRODUCTION

various network, Internet, and e-mail protocols, such as IP, TCP, UDP, ICMP, IGMP, FTP, HTTP,
SMTP, POP3, IMAP, and NNTP. The end of this chapter explains domain names, firewalls, web
proxies, and XML web services.
Chapter 2 provides you with a background for working with streams. A stream is an
abstract representation of a sequence of bytes such as a file, an I/0 device, or a TCP /IP socket.
Through this abstraction, different devices can be accessed with the same process, and similar
code can be used to read data from a file input stream as can be used to read data from a
network input stream, for example. In this way, the programmer's need to worry about the
actual physical mechanism of the device is removed. We take a look at streams in .NET 1.1-
the STREAM base class for all other stream types, and work with the concrete FILESTREAM,
BUFFEREDSTREAM, MEMORYSTREAM, NETWORKSTREAM, and CRYPTOSTREAM classes and stream manip-
ulation. We also show you how to read from and write to binary and text files, and serialize
objects into XML and binary format.
Chapter 3 starts to get you to grips with network programming in .NET 1.1, beginning
I
with classes from the SYSTEM. NET namespace. We kick off with a discussion of these classes-
and you'll see later on how they play a fundamental role in all the following chapters of this
book. Specifically, we'll see how to work with URis, IP addresses, and DNS lookups. We see
how to handle requests and responses through the WEBREQUEST and WEBRESPONSE classes, and
begin looking at authentication, authorization, and the permissions relevant to network pro-
gramming.
Chapter 4 is about socket programming, and we explain to you the low-level program-
ming that is required to perform network-related tasks. A socket is one end of a two-way com-
munication link between two programs running on a network. We'll look at the socket support
in .NET-the SYSTEM. NET. SOCKETS. SOCKET class, building a port scanner application, and cre-
ating both synchronous and asynchronous client-server applications.
Chapter 5 deals with the details of raw socket programming, the base for building custom
network protocols. The first part of this chapter covers the basic implementation of the Inter-
net Control Message Protocol (ICMP) and the second part the Simple Network Management
Protocol (SNMP). As ICMP deals with Internet control messages, we will build two of the most
used utilities in network diagnostic scenarios: PING and TRACEROUTE. Then, we will show an
implementation of the SNMP protocol, used for remote network device management.
Chapter 6 is about a new addition in .NET Framework 1.1: the support for the IPv6
protocol. IPv6 is short for Internet Protocol Version 6. IPv6 is the "next generation'' protocol
designed by the Internet Engineering Task Force (IETF) to replace the current version Internet
Protocol, IP Version 4 (IPv4). IPv6 fixes a number of problems in IPv4, such as the limited
number of available IPv4 addresses. It also adds many improvements to IPv4 in areas such
as routing and network auto-configuration. We will discuss the .NET and Windows operating
system support for IPv6, showing how to install and configure this protocol. Then we will
build an IPv6-based client-server application and a simple multicast application showing
the basics of multicast network communication.
In Chapter 7, we begin a tour of the higher-level network classes in the .NET Framework,
commencing with those for dealing with the Transmission Control Protocol (TCP). We start
with a general introduction to TCP, and its architecture and data structures, before moving on
to explore the TCPCLIENT and TCPLISTENER classes for working with TCP. You'll build client-
server applications using the TCPCLIENT and TCPLISTENER classes, and then write a fully func-
tional e-mail client to see the power ofTCPCLIENT. You'll also create a multithreaded echo
server, with the support of the .NET multithreading classes. We end this chapter for you
IIINTRODUCTION xxi

with a quick look at the .NET Remoting Framework, and particularly the TCPCHANNEL transport
channel provided with the .NET 1.1 Framework.
Chapter 8 is about the UDPCLIENT class, through which we implement the User Datagram
Protocol (UDP). You'll learn about the fundamentals of the UDP protocol, and then see how
to use the UDPCLIENT class. While TCP is a more reliable protocol than UDP, it also adds a lot of
overhead. Accordingly, UDP is faster, and is well suited for multimedia transmissions such as
video streams-where the precise order that packets arrive in may not be critical. In this
chapter, we also discuss with you the higher-level UDP-based protocols.
Chapter 9 is about multicasting. This is the technology that made possible the transmis-
sion of a live Rolling Stones concert in 1994 over the Internet; it allows us to watch astronauts
in space, or to hold meetings over the Internet, to name but a few benefits. With multicasting,
a server only has to send messages once, and they will be distributed to a whole group of
clients. We therefore begin Chapter 9 by comparing unicasts, broadcasts, and multicasts.
You'll study the architecture of multicasting, and learn how to implement multicast sockets
in .NET 1.1. You create two Windows applications in this chapter using multicasting features-
one application makes it possible to chat with multiple systems, where everyone is both a
sender and a receiver. The second application-in the form of a picture show-demonstrates
for you how large data packets can be sent to multiple clients without using a large percentage
of the network bandwidth.
Chapter 10 covers the HTTP protocol and its robust implementation exposed by .NET.
The HTTP protocol's importance as an application protocol is significant, since a large share
of web traffic today uses this protocol. In Chapter 10, we therefore begin with an overview of
the HTTP protocol-the HTTP headers, and the format of HTTP requests and responses. You'll
take a deep look at the classes in .NET for working with HTTP, and see how to read and write
cookies. You'll then see how to create an HTTP server with ASP. NET support, before continu-
ing your study of .NET Remoting and the HTTP transport channel. You'll be well set in this
area after reading this chapter.
We get to e-mail in Chapter 11. In this chapter, we begin with a high-level overview of the
various e-mail protocols and how they are accessed and used in a .NET 1.1 environment. We'll
show you the fundamentals of the SMTP, POP3, IMAP, and NNTP protocols, and see how these
protocols work together to send and receive e-mail messages over the Internet. We'll also take
a look at sending e-mails with the .NET Framework's classes for sending e-mails via SMTP, as
well as developing some grassroots protocol implementation classes for POP3 and SMTP.
In Chapter 12, we discuss the topic of securing network communications. The
SYSTEM. SECURITY. CRYPTOGRAPHY namespace of the .NET Framework provides programmatic
access to the variety of cryptographic services that we can incorporate into our applications to
encrypt and decrypt data, ensure data integrity, and handle digital signatures and certificates.
In this chapter, we'll therefore explore with you this namespace, but also provide you with an
introduction to cryptography and all of its key concepts. This is a topic you can take much
further, of course, but we open that door for you in this chapter. We'll also take a look at secur-
ing a particular chat application that we created earlier in the book.
We close the book with Chapter 13, where we take a look at authentication protocols.
Authentication has become a major issue for any application developer who expects code to
run across a network, or across the Internet. Making sure that users are who they say they are,
and verifying machine identities on demand, is all part of an application's security module.
In this final chapter, you'll see what the authentication protocols involved in Microsoft's net-
working schemes are, how they work, and how they apply to the various versions ofWindows.
xxii IIINTRODUCTION

We will discuss protocols such as NTLM, Kerberos, and various types ofWmdows authentica-
tion methods such as Credentials Management, GINA, LSA, smartcard authentication, and
Wmlogon. At the end of the chapter, we'll show you the .NET security architecture, and
provide you with an explicit implementation of the .NET Resource Security.

What You Need to Use This Book


To run the code solutions and examples in this book, you need to have a machine with the .NET
1.1 Framework installed. This means that you'll need to be running either a type ofWmdows
server (Wmdows 2000 Server or above) or a Wmdows workstation type (Wmdows 2000 Profes-
sional or Wmdows XP). We also recommend that you use Visual Studio .NET 2003 with this book,
but you can also build the sample applications using the .NET Framework l.l SDK.
CHAPTER 1

Networking Concepts
and Protocols

In this chapter, we introduce some of the basic networking concepts and protocols. The
chapter serves as a foundation to networking that will allow you to tackle programming in
the rest of the book. It doesn't matter if you plan to develop server applications running as
Windows Services (offering some data for clients using a custom protocol), if you write client
applications that request data from web servers, or if you create multicasting or mailing appli-
cations-you should start with reading this chapter. If you don't already know what a router or
a network switch is, if you aren't sure about the functionality of the seven layers in the Open
Systems Interconnection (OSI) protocol model, or if you just want a refresher or an overview
of the different network protocols and their uses, then this chapter is addressed to you.
We start with an introduction to the hardware used in local area networks (LANs), such as
routers, hubs, and bridges. Then we take a look at the seven layers of the OSI model and their
functionality, and how the Transmission Control Protocol/Internet Protocol (TCP /IP) suite fits
into the OSI layers. After that, we cover the functionality of various network protocols.
In particular, we discuss the following topics:
• The physical network
• The OSI seven-layer model
• Network protocols (including basic protocols, Internet protocols, and e-mail protocols)
• Sockets
• Domain name lookups

• The Internet

• .NET Remoting

• Messaging
30 CHAPTER 1 • NETWORKING CONCEPTS AND PROTOCOLS

Another FTP client is Microsoft Internet Explorer. Instead of using a URL such as
http: I lhostname, you start the FTP client with ftp: I I as a schema identifier. This tool
allows files to be copied with drag and drop (see Figure 1-19).

,. / , Search Folders r-""'1 .


1.!.:!1

t> 41 ftp:f/ftp,mcrosoftcon1/developr/
Name Sile Type

Other Places
~ Fie Folder 2/ 24/ 2000 12:00 AM
..)basic Fie Folder 7/2/2002 12:00 AI>!
Fie Folder 2/25/ 2000 12:00 AN
:.:iJ ftp.mJcrosoft.com
~ DEVCAST
...ldevutl Fie Folder 712/2002 12:00 1\1>1
.._) My Docum<nts t:l drg Fie Folder 8/16/2002 12:00 1\1>1
,..:. Shar~E~d Oorum@'n.ts .:Jdstib Fie Folder 2/25/ 2000 12:00 1\1>1
~ My Uetv. ork P1aces u fonran Fie Folder 7/ 2/2002 12:00 Af-1
fox Fie Folder 7{2/2002 12:00 Al-l
GEN_INFO Fie Folder 712/ 2002 12:00 1\1>1
Details ~ .::liE File Fotler 2!28/ 2001 12:00 AM
lntelix Fie Folder 5/ 17/2002 12:00 AM
~!API Fie Folder 2/ 25/2000 12:00 AM
masm Fie Folder 7{2/2002 12:00 AM
Fie Folder 2/25/ 2000 12:00 1\1>1
Fie Folder 8126/ 2002 12:00 AM
Fie Folder 2}25/2000 12:00 AM
mutmedia Fie Folder 2/ 25/ 2000 12:00 AM
ODBC Fie Folder 7/ 2/2002 12:00A~1
ole Fie Folder 7/ 2/2002 12:00 A/·1
OleDB Fie Folder 2}25/2000 12:00 AM
pc95 Fie Fotler 2/25/2000 12:00 AJII
PlatformSDK Fie Folder 4/ 10/2002 12:00 AM
C rfc Fie Folder 2/ 25/2000 12:00Af>l
AE /9!700U2:0Q.ll~l - -
User: Anonymous r. Internet

Figure 1-19. Using Internet Explorer to access an FTP server

Hypertext Transfer Protocol (HTTP)


HTTP is the main protocol used by web applications. Similar to the FTP protocol, HTTP is a
reliable protocol that is achieved by using TCP. Like FTP, HTTP is used to transfer files across
the network. Unlike FTP, it has features such as caching, identification of the client applica-
tion, support for different attachments with a MIME format, and so on. These features are
enabled within the HTTP header.
To demonstrate what an Internet browser is doing when it requests files from a web
server, you can use the telnet application to simulate a browser (see Figure 1-20). Start the
telnet application by entering telnet in the Run dialog box of the Start menu. You should see
the Microsoft Telnet> prompt. Enter set localecho (set local_echo on Windows 2000) to
display the entered commands locally for demonstration purposes. If you don't set this
option, commands you send to the server won't be displayed by the telnet application. You
can specify a log file with the set logfile command. Now you can connect to the web server
with the open command. The command open msdn. microsoft. com 80 creates a TCP connec-
tion to port 80 of the server at msdn. microsoft. com. The telnet application uses port 23 by
default, hence you have to specify a port for the HTTP request. The default port of a web
server offering HTTP services is port 80.
CHAPTER 1 NETWORKING CONCEPTS AND PROTOCOLS 3

Examples of switched lines are Plain Old Telephone Service (POTS, standard analog
lines that support speeds up to 56 Kbps), ISDN, and Digital Subscriber Line (DSL).

e A packet-switching network is where the service provider supplies switching technol-


ogy to interface with the backbone network. This solution provides increased perform-
ance and shares resources between customers, so that bandwidth is available on demand.

Protocols used for switching networks include X.25 (up to 64 Kbps), frame relay (up to
44.736 Mbps), andATM (up to 9.953 Gbps).

Ethernet
To give you a better understanding of how physical networks work, we'll look at the most
common LAN network architecture, Ethernet. Ninety percent of devices attached to a LAN
use Ethernet, which was developed by Xerox, Digital Equipment Corporation (DEC), and Intel.
In 1980, the IEEE 802.3 CSMA/CD standard specified a 10 Mbps Ethernet.
Nowadays, Ethernet can support 100 Mbps and 1 Gbps lines. Many cabling technologies
can be employed with Ethernet. There is a standard naming convention that indicates the
speed of the Ethernet network and the properties of the cable technology in use. Such names
start with a number indicating the maximum data transfer speed, followed by a word indicat-
ing the transmission technology supported, followed by a number indicating the maximum
distance between nodes. For instance, 10Base2 denotes an Ethernet that operates at 10 Mbps
using baseband transmission, with cables that have a maximum length of 200 meters. Some
other common configurations are shown in Table 1-1.

Table 1-1. Ethernet Cables


Ethernet Standard Speed Typical Cable Type Description
10Base5 lOMbps Coaxial copper This was the original standard for
Ethernet, a so-called thick-net
cabling technology.
lOBaseT lOMbps Copper 10BaseT is a 10 Mbps network with
twisted-pair cabling. A twisted pair
is simply that-a pair of wires
twisted around each other.
lOOBaseTX lOOMbps Copper This is a 100 Mbps network with
twisted pair cabling and full-duplex
(X) capability. Full duplex means
that data can pass in both directions
simultaneously.
lOOBaseSX 1,000 Mbps Multimode fiber This is a 1,000 Mbps network with
fiber optic cables. The "S" indicates
the short wavelength (850 nm) of
the laser.
4 CHAPTER 1 • NETWORKING CONCEPTS AND PROTOCOLS

CSMAICD
Ethernet is a Carrier Sense Multiple Access/ Collision Detect (CSMA/ CD) network. Multiple
devices are connected to the same network, and all have simultaneous access. When a
message is sent, it is transported across the complete network as shown in Figure 1-l. The
receiver is identified by its unique address, and only this node reads the message; all other
nodes ignore it.

Sender

'----.,----......l. Ethemet-r----L-------+-
More
Nodes

llllillll
Receiver

llllillll

Figure 1-1. Ethernet

There is a potential problem: more than one node could attempt to send a message at the
same time, which could result in the packets becoming corrupted. The solution used by Ether-
net is that every node monitors the network and is thus aware of traffic. A node can start
sending data only if no data is already being sent over the network. In short, this is the CSMA
part of CSMA/ CD.
There is still, however, the possibility that two nodes, after checking that the network
is not already in use, start sending a packet at exactly the same time on the same network
cable. This would cause a collision between the two packets, resulting in corrupted data.
Both senders are aware of the corrupted packet because they still listen to the network while
sending data and thus detect the collision. This is the CD in CSMA/CD. Both nodes then halt
their transmissions immediately and wait a random time interval before checking the network
again to see if it is free to resend the packet.
Every node on the local network uses a Media Access Control (MAC) address for unique
identification. This address is defined by the network interface card (NIC) . A network packet
is sent across the network, but if the NIC does not identify its host as a receiver, it ignores the
packet. Incidentally, if the packet has the same destination address as the node that is listen-
ing, the message is dealt with.

Other Network Architectures and Protocols


Token Ring (IEEE 802.5) is a network architecture developed by IBM. The nodes are connected
in a ring, as shown in Figure l-2. With Ethernet, any node can send a message as long as there
isn't already traffic. With Token Ring, every node has guaranteed access to the network in a
predefined order. A token circulates around the network ring, and only the node that holds the
token can send a message. Nowadays, Ethernet is gradually replacing Token Ring networks
because Token Ring is more expensive and more difficult to implement.
CHAPTER 1 • NETWORKING CONCEPTS AND PROTOCOLS 5

Figure 1-2. Token Ring transmissions circulate only when a node owns the token.

AppleTalk is a LAN protocol developed by Apple for Apple Macintosh networks that has
been quite popular in schools, factories, and so on.
Asynchronous Transfer Mode (ATM) is another protocol that can be found in LANs. It sup-
ports fast network-switching and has a guaranteed quality of service (QOS), but because the
cost of ATM network cards is very high, ATM is a niche player in the LAN market. ATM is used
for LANs only in installations that require extremely high performance, for example, to trans-
mit medical images such as X-rays between hospitals. In the backbone that drives WAN net-
works, ATM plays a more important role.

Physical Components
An important aspect of understanding the network is knowing the hardware components. In
this section, we cover the major components of a LAN:
• NIC
• Hub

• Switch

• Router

Network Interface Card (NIC)


A NIC is the adapter card used to connect a device to the LAN. It allows you to send messages
to and receive messages from the network. A NIC has a unique MAC address that provides a
unique identification of each device.
The MAC address is a 12-byte hexadecimal number uniquely assigned to an Ethernet
network card. This address can be changed dynamically by a network driver (as is the case
with the DECnet system, a network developed by Digital Equipment Corporation), but usually
the MAC address is not changed.
6 CHAPTER 1 • NETWORKING CONCEPTS AND PROTOCOLS

You can find the MAC address of a Windows machine using the command-line utility
ipconfig in a DOS/CMD prompt with the /all switch. Figure 1-3 shows the output pro-
duced on a machine where the MAC address is 00-04-23-83-D1-BB. The first part of this
number, 00-04-23, is assigned to the manufacturer of the network card; the manufacturer
uses the remainder to create a unique MAC address.

Figure 1-3. Output ofipconfig command

Hub
Multiple devices can easily be connected with the help of a hub (see Figure 1-4). A hub is a
connectivity device that attaches multiple devices to a LAN. Each device typically connects
via an unshielded twisted pair (UTP) cable to a port on the hub. You may have already heard
about the Registered Jack-45 (RJ -45) connector. This is one of the possible port types on a hub,
but a hub can also support other cable types. A hub can have from 4 to 24 ports. In a large
network, multiple hubs are mounted in a cabinet and support hundreds of connections.
The hub acts as a repeater as it forwards every message from each port to every other
port, and to the network. A hub is a fairly simple element of a network, operating at the physi-
cal network layer to retransmit data without any processing. This makes a hub easy to install
and manage, as it doesn't require any special configuration.
Another Random Document on
Scribd Without Any Related Topics
The parodies, rich in thieves' slang, at an end, and the bottles
empty, the grateful pensioners of the national workshops resumed
their march, cutting practical jokes, and cudgel-playing with the
acacias, which were considerably deteriorated by the proceeding.
"Such," says Jérome Paturot, "was the end of this memorable day,
during which Oscar and myself were enabled to appreciate a
national workshop and the services it rendered. The account was
easily made up. Two hundred and fifty men had carried two hundred
and fifty saplings. Two francs for each man's day's work, and three
francs for each acacia, made five hundred francs on the one hand,
and seven hundred and fifty on the other. Total cost, twelve hundred
and fifty francs. Not one of the plants survived the consequences of
the breakfast, notwithstanding which there was the expense of
planting them, and afterwards that of digging them up. Double
work, double charges. Such were the national workshops; such the
profits of the institution."
The allusion in the tavern-scene to Mademoiselle Rachel is not the
only cut administered by M. Reybaud to the tragedy-queen of the
French republican stage.
Jérome and Oscar, strolling one evening down the Rue Richelieu,
found a crowd at the theatre doors. The Provisional Government
treated the people to the play. The whole mass of tickets was
divided amongst the twelve mayors of Paris, who distributed them in
their arrondissements. But somehow or other a considerable number
had got into the hands of the ticket merchants, and for twenty
francs Paturot and his companion obtained a couple of stalls. The
play over, the hour of the Marseillaise arrived.
"The tragedian approached the foot-lamps, a tricoloured flag in her
hand. Her manner of singing the republican hymn at once carried
away and revolted the hearer. It was like the roar of the lioness
urging her male to the combat. The tone was not of our period; its
energy and ferocity had no sufficient motive. It breathed vengeance
—where was the injury to revenge? conquest—and where the
territory to conquer? Even as an artistical study, the effect should
have been more measured, more restrained. That effect was
nevertheless great, and was felt by every one in the theatre. Under
the flash of that glance and the power of that voice, a sort of low
shuddering ran along the benches, and was broken only by a
universal acclamation. The enthusiasm sustained itself thus to the
last couplet, which was of itself a scene and a tableau."
The song over, a workman in a blouse leaped upon the stage, bent
his knee before the actress, and presented her with a bouquet of
choice flowers and a paper. The manager, at the demand of the
audience, read the latter aloud. It was the following acrostic in
honour of Rachel:—

R eine de l'empire magique,


A vous ce don de l'ouvrier;
C harmez-nous par votre art magique,
H éroïne au royal cimier,
E t chantez d'un accent guerrier
L' hymne ardent de la république.

This apropos piece of gallantry drew down thunders of applause, to


which the members of the Provisional Government there present
contributed their share. But Paturot had recognised, to his great
surprise, in the bouquet-bearer, the smart young scamp of whom he
had purchased his admission, and whom he had noticed as being
evidently a leading character amongst the not very reputable
fraternity of ticket-mongers. Curious to penetrate the secret of his
sudden metamorphosis, he followed him, and overheard his
conversation with his colleagues. The bouquet had cost fifty francs,
the acrostic five, flowers of literature being cheaper under the
republic than those of the hothouse. Mitouflet's comrades are
bewildered by his extravagance, until he divulges the secret that—
government pays. "Happy nation!" exclaims Jérome, "whom a
benevolent government finds in bread and tragedies! What more can
it desire?"
No class of society escapes M. Reybaud's satire. Under the title of
"The Victims of Events," he devotes a chapter to the authors, artists,
and actors whom the revolution has deprived of bread. They deserve
their fate, he maintains; they have abandoned the true for the
worship of false gods, they have dealt in maleficent philters instead
of wholesome medicines; they have used their power to mislead and
corrupt, not to guide and rightly direct, those who pinned their faith
on their performances. They were mischievous quacks, not
conscientious physicians. The literary sufferers are the first whom he
exhibits. "Some employed history as a die, and struck with it a coin
of very base metal." Take that, M. Dumas. "Others fomented violent
instincts in the bosom of the masses, and invited them to
sacrilegious revolts, exhibiting only the impurities of civilisation, and
conducting the people to anger by the road of disgust." This, we
need hardly say, is levelled at the Sue school. But the names of
these men, one day so loud in the ears of the multitude, the next
were drowned in the tumult of revolutions. "To fill the cup of
bitterness to the brim, it was not honour alone that remained on this
calamitous field of battle. The bank-notes shared the same fate.
Who would have predicted this, in those opulent days, when a piece
of gold was found at the end of every line, like the natural product
of a seemingly inexhaustible mine? Who would have foretold it in
those hours of success, amidst the intoxications of luxury, and in the
indulgence of a thousand caprices worthy an Eastern prince? Every
road was then strewed with emeralds, every path covered with
rubies. There was no style of living that Imagination, with its fairy
fingers, could not sustain. She gave her favourites every thing—
coaches and lackeys, open house, and a prince's retinue. How
remote is that happy time! What a falling off in that Asiatic
existence! Where are the emeralds? where the rubies? The bank-
note is a figment; gold a chimera. Money and glory have gone down
into the same tomb.... But the man of style was not easy to
vanquish. He braved neglect, and, deeming himself a necessary
element in the world's economy, he set to work again—only,
following the example of the modern divinities, he took care to
transform himself. Hitherto, politics had appeared to him of
secondary importance, and he had abandoned them to colourists of
an inferior grade. Events had rendered them worthy of the great
pens of the age. 'Aha!' said the man of style—'Aha! they force us to
it: very well, they shall see. We lived quietly in the sanctuary of art,
asking but sequins and perfumes of the external world. Provided the
sherbet was cool and the amber bright, what cared we for the rest?
But now they besiege us in our favourite asylum. Distress is at the
door, pressing and menacing. To arms, then, to institute a new
system of politics.' And the man of style entered the arena of
politics, ferula in hand, and spur on heel." But only to encounter a
lamentable break-down. It is pretty evident whom M. Reybaud had
in view when making this sketch, here greatly abridged, but which is
very exact and amusing in its details, and must be particularly
gratifying to Alexander Dumas. He then takes up the painters, and
exposes the system of mutual puffing and hired criticism. The
comedian has his turn: "But lately he reigned and laid down the law.
Each note of his voice was a priceless treasure; his gestures were
current coin. For him the bank had not enough notes, nor fame
enough trumpets. The mob crowded round him, when he walked
abroad, as round a prince of the blood. Vienna and Petersburg
disputed him; the two worlds were his domain. How believe that
such an idol should one day be hurled from his pedestal?
Nevertheless it came to pass. He beheld vacant benches and an
empty treasury. He had been improvident, and misery sat down by
his hearth. Perhaps he then remembered how he had defied fate,
and squandered wealth; how he had abused every thing—his health
and his talent, the public and himself. Had he not given into that
vein of falsehood and monstrosity, which made the theatre a school
of perversity, and art an instrument of disorder? Had he not
degraded the stage by creakings of snuff-boxes and misplaced
hiccups? Had he not ridiculed, in a celebrated type, instincts the
most sacred and worthy of respect? Such excesses escape not
punishment." There is much truth in this. But is it a fact, that
Frederick Lemaitre (here evidently selected as the type of his
profession) has thus suddenly lost his popularity and sunk into
poverty? The last time we saw his name in a French theatrical
feuilleton, his successful appearance in a new piece was recorded.
Has he not also, since the revolution, drawn crowds to witness his
performance of Robert Macaire, the piece to which M. Reybaud more
particularly alludes, and which was prohibited under the monarchy,
because Lemaitre, in acting the part of the swindler Robert, used to
make himself up to resemble Louis Philippe, and introduced
unpleasant hits at the King of the French? There is no question,
however, that Lemaitre is an instance of the prostitution of great
talents. With more respect for himself and for the public, he might
have aspired to a high place in the profession, with one of whose
lower walks he has all his life remained contented.
Meanwhile, secret hands were at work preparing a movement, of
which the national workshop was to be the chief instrument. One
morning, when stone-breaking at the Porte Maillot, Percheron took
Comtois aside to inform him that the clubs had decided on an
outbreak. Comtois does not at first relish the idea, and is anxious to
return to his hammer and pebbles, but Percheron, who, by reason of
his superior intelligence, is one of six workmen to whom the plan
has been communicated, bewilders the simple giant by the sunny
prospects he exposes. This time it is the people who will reap the
profits of the revolution. No more kid gloves and varnished boots;
the blouse will be the passport to the good things of this life. No
more wages. All Frenchmen are to be partners. An immense
association; real equality; the workman well dressed, well fed, well
housed, and always with twenty-five francs in his pocket, guaranteed
by the state. The bourgeois, the rich man, is to be entirely
abolished. Under pain of death, no one is to have more than a
hundred francs in his possession. Costly furniture, plate, carriages,
liveries, fine houses, jewellery, statues, pictures—all are to be
suppressed. Poor stupid Comtois, venturing to inquire what will
become of servants, jewellers, coach-makers, &c., &c., is forthwith
snubbed by his smarter comrade. "They will do something else;
there is to be work for every body." The communists have found an
apt scholar in Percheron. Comtois reflects, admits they can always
break stones, and agrees to place himself, upon the following
Monday, at the orders of the conspirators. Upon that day (the
famous 15th May) the fate of the Poles is to be discussed in the
National Assembly; and, under colour of a demonstration in their
favour, a clean sweep is to be made of the representatives of the
people.
There had been so much talk about this debate, that Madame
Paturot resolved to witness it, and by great exertions she obtained a
ticket. She could no longer reckon on Simon for admission, the
ungrateful miller having passed over to the enemy, and yielded
himself captive to the fleshpots and flatteries of the "Provisional."
Jérome, who had a presentiment of danger, urged her not to go, the
more so as she would have to go alone, for he could get no order.
But the exgrisette, all courage and confidence, laughed at the notion
of danger, despised caution, and betook herself to the Chamber.
Paturot and Oscar sauntered on the Boulevards. Nothing indicated a
disturbance, until they reached the Porte St Denis. There the scene
changed as suddenly as at shifter's whistle. A multitude of heads
covered the Boulevard, green branches forming above them an
undulating canopy of verdure. The throng moved steadily in one
direction: songs and cries broke from its bosom. The name of Poland
was predominant. Oscar caught the infection and repeated the cry,
"Vive la Pologne!" In vain Paturot remonstrated. The artist's beard
bristled with excitement. He had passed seven years of his childhood
in the same room with a portrait of Poniatowski taking his famous
leap into the Elster. After that, would Jérome have him forget
Poland? Forbid it, heaven! And "Vive la Pologne!" "The column
advanced, with its leafy trophies—the clubs, the national workshops,
(Comtois and Percheron in the van,) with flags and banners, cards in
their hatbands, and other rallying signs. There was a certain degree
of order. Here and there, at street corners, were seen the great
leaders of the manifestation, presidents of clubs, or persons to
whom captivity had given celebrity, encouraging their men by word
and gesture, now by a short speech, or apropos cheer, then by a
shake of the hand. Oscar knew all these heroes of revolt, these
princes of the prison." And knowing them, the impetuous artist was
at least convinced that Poland was only the pretext. He ceased his
ill-advised hurras, and resumed the part of a mere observer. As the
column advanced, the shops shut. The air was full of menacing
sounds. Thousands of Poles and Italians, bearing the banners of
their respective countries, joined the mob. Uniforms abounded,
officers' epaulets were not rare: even those corps charged with the
police of the city contributed their quota to the concourse. The
multitude pressed forward with the confidence of people who
dispose of an empire. The chiefs of the insurrection were not men to
enter the field unadvisedly, and their countenances betrayed a
consciousness of strength. Their passage afforded evidence of a vast
complicity. They advanced, without obstacle or impediment, even to
the very doors of the Assembly. A few bayonets upon the bridge
leading to the palace were overthrown in an instant, and the
building was forthwith surrounded by furious groups. The gates were
burst by Comtois and his companions: the Assembly was invaded. "A
shameful page in our history!" exclaims M. Reybaud. "A sad and
fatal commencement! Time itself cannot efface the stain. Upon the
roll of history will remain recorded the fact, worthy of a barbarian
horde, that, during three hours, an Assembly, chosen by the voices
of the whole nation, was left exposed, defenceless, to the outrages
of turbulent scholars, and to the contact of impure adventurers."
Uneasy about his wife, Jérome Paturot tried to enter the house, but
one of the insurgents replaced the usual guardian of the gate, and
demanded the card of his club. No admission without proof of his
belonging to the Droits de l'Homme, or the Conservatory, or the
Palais National. So Jerome waited outside. Suddenly a cry was
raised, "To the Hotel de Ville!" and there was an instant rush in that
direction. Oscar, who hitherto had watched for Malvina at one
entrance of the Chamber, whilst his friend stood sentry at the other,
could resist no longer. He had a relapse of the revolutionary vertigo.
"To the Hotel de Ville!" shouted the mob.
"Hurra for the Hotel de Ville!" repeated Oscar. "It is not exactly the
way to the land of the Jagellons; but what matter? What a curious
people! Nothing will serve them but to take the Hotel de Ville every
week."
And away went Oscar to share in the capture. The rescue had come,
and the mob was expelled from the Chamber. Jérome, who could
see nothing of Malvina, returned to his lodgings in great alarm. After
a while a porter brings him a letter. It is from Madame Paturot,
giving, in the well-known grisette-dialect, an account of her
adventures, written down in the interval between the expulsion of
the rioters and the resumption of the sitting. It is about ten times as
long as could be written in the time, but it is necessary to narrate
what passed within the Chamber, as well as what occurred without;
and no one is more capable than Malvina. In her picturesque and
popular style, she gives a graphic bulletin of the strange events she
has witnessed. The recital acquires additional interest, when we
remember that M. Reybaud is a member of the Assembly, and was
doubtless present at the scene described. After a certain amount of
satirical gossip touching the appearance of the Assembly, dress of
the members, and the like, Malvina proceeds to the event of the
day: "A black-coated orator occupied the tribune, recalling the
memories of the Empire, and dwelling warmly on the exploits of the
Polish lancers, when a formidable noise made itself heard. It seemed
to come sometimes from without, sometimes from beneath the
ground. I began to think coiners had established themselves in the
palace vaults, or that the Allies had re-entered Paris to blow up the
bridge of Jena. The noise had nothing sustained or regular,—it was
in great bursts, followed by sudden silence. It is best to tell things as
they are, my dear; no use flattering people. The first impression the
Assembly experienced was disagreeable enough: there were some of
the elect of the people, who may not have admitted it to
themselves, but who would have liked to be elsewhere. A mere
matter of preference! A deputy is a man, after all, and the roar at
the door of the palace had nothing very soothing. However, the first
emotion did not last; the sentiment of duty overcame it. They sat
down and waited the event. I don't deny they listened less to Poland
than to what passed outside, but their bearing was becoming, and
their countenance good. You may believe me, for I am a judge."
Presently crash went the door, and there entered a legion of ruffians
in blouses. The spectators' galleries and the body of the house were
alike invaded. All the doors gave way, and the Chamber was
thronged. The atmosphere was infected by the obscene multitude,
reeking with wine and tobacco. Filthy flags were waved over the
heads of the deputies. The vilest language was heard; the utmost
confusion prevailed; not one of the intruders seemed to know why
he was there, or what he came to do. The president was under a
kind of arrest, guarded on one side by an artillery-man with drawn
sabre, on the other by a ruffian dressed as a workman; and every
moment the banners of the clubs were waved over his head.
Sometimes he was almost pushed out of his arm-chair by the
popular orators, who got astride upon its back, or stood upon his
table. "The representatives," Madame Paturot speaks, "kept their
seats, and did the Roman senator very tolerably. The rioters did not
meddle much with them, except with two or three, who had scuffles
with the insurgent leaders. Simon was one of those. His seat was
under the gallery, and an insurgent, risking a perilous leap from the
elevation, alighted upon his shoulders. Our miller was not
accustomed to such treatment. A sack of flour—well and good; but a
man was too much. He took this one by the collar, and shook him
nearly to death. The fellow bellowed for assistance, but Simon's
strength deterred interference, and the affair went no further. Others
of the elect of the people were less fortunate, and received at the
hands of their constituents a new baptism, not prescribed by the
constitution. What then, Jerome? Who loves well chastises well.
Thus did these sovereigns of the street testify their affection." The
orator's tribune was besieged by the chiefs of the insurrection—all
anxious to speak. It was continually assaulted and taken; one
speaker pulled down, and another taking his place, to be, in his turn,
expelled. Those who succeeded in making themselves heard,
proposed absurdities. One clamoured for Poland; another would levy
an impost of a thousand millions, to be paid by the rich; a third
declared a traitor to his country whosoever should cause the drums
to beat alarm; a fourth notified to the Assembly that it was then and
there dissolved. This last announcement raised a hurricane. "The
mob no longer shouted—it roared. The president still protesting, his
arm-chair was carried by assault. In an instant every thing was
swept away. The bureau of the Assembly was filled with workmen,
who assumed heroic postures, stamped upon and broke every thing.
The representatives could do nothing in this scene of devastation.
One by one they retired. The clubs remained masters of the field of
battle, and the Red banner floated in the hall. The scene attained
the utmost height of confusion. The clubs had the power, or thought
they had, but knew not what to do with it. Lists were made out, and
again destroyed. Names were proclaimed, and forthwith hissed. It
was the Tower of Babel. Who can say how it would have ended but
for the interference of the mobile? Brave mobile! At the very
moment they were least expected, their drums resounded close at
hand." The sound was enough for the rioters, who ran in every
direction, and in ten minutes the hall was clear. Malvina subjoins her
indignant reflections on these extraordinary scenes, casts a
considerable deal of dirt upon the beards of the Provisional
Government, and is curious to know what sort of fricassee
Buonaparte would have made of such a set of braggarts and
incapables.
Madame Paturot had borne herself with her accustomed valour in
the midst of the scuffle, and was then under Simon's protection.
Jerome, no longer anxious on her account, is about to retire to rest,
when a tremendous noise is heard on the staircase, and Oscar
rushes in, imploring shelter and concealment, and declaring himself
a state criminal. He had been to the Hotel de Ville with the
insurgents; Percheron and Comtois had recognised him, and, in
memory of his having stood treat at Ville d'Avray, had elected him
general on the spot. The Hotel de Ville taken, it was necessary to
appoint a government. A party of workmen established themselves
in a sumptuous saloon, on velvet cushions and rich carpets, to
deliberate on this important point. Percheron had his list cut and
dried in his head. It was heard with acclamation, at once adopted,
and inscribed upon a slate hung against the wall. The three first
names ran thus:—
Oscar, President of the Council.
Percheron, Minister of Finance.
Comtois, Minister at War.
Surprised by the national guards just after the issue of a decree
providing for its personal comforts, the new government was
suddenly broken up. Assisted by Comtois, who forced two or three
doors with his shoulder, Oscar escaped, pursued by horrible visions
of an army of police on his track, of capture, a dungeon, or perhaps
the scaffold. With the greatest difficulty Paturot persuades him that
his retreat is not an object of diligent inquiry on the part of the
executive, and that, during the day's brief anarchy, too many lists of
new governments have been drawn up for particular attention to be
paid to that, at whose head figures the name of the crack-brained
artist. As a good precaution, however, he advises Oscar to shave his
beard and his head, and take a course of cold douches, measures
calculated to mislead as to his identity, and to calm the
effervescence of his ideas.
But Oscar is incorrigible. A mob is for him an irresistible magnet. He
must join it, and, having joined it, he must swell the cry for the
crotchet of the hour. For a time (a long time Paturot calls it, in
consideration of the popular fickleness) the republic had been the
ruling mania, and held undisputed sway with the multitude. Alone
she waved her banners to the breeze, and filled the air with clamour,
defying opposition. Suddenly a new sound was borne upon the gale,
an echo of military glories not yet forgotten; a new standard was
unfurled, inscribed with the names of Austerlitz and Jena. "The
Empire raised its head; it had its emblems and its rallying-cries; it
had also its candidates. The manifestation was sudden as it was
unexpected. It had been thought that the Old Guard and the
Emperor were done with: the latter slept under the granite of the
Invalids; the former, sculptured on the Vendôme column, mounted
spirally towards heaven. Dear and sacred memories! why disturb you
by absurd pretensions? Why load you with the responsibility of
ridiculous enterprises? Your greatest honour, your highest title, is
your isolation in history, detached from past and future, like a
terrible and luminous meteor." The people did not reason thus. They
wanted change, a new toy, no matter what. Every night, from eight
to ten, crowds assembled on the boulevard near the gates of St
Denis and St Martin, (the old resort of the disaffected,) and
animated discussions went on. Groups were formed, orators stood
forth, the throng increased, the circulation was impeded, until at last
the armed force appeared and the mob dispersed. For some time
this was the order of every night. "Revolutionary emotions yielded
the ground to imperial emotions. Vincennes was eclipsed by the fort
of Ham. Was it calculation or impulse? Perhaps both: calculation on
the part of the chiefs, impulse and enthusiasm on that of the people.
Strange people, lovers of noise and gunpowder, who rush into the
street without a motive, and fight to the death ignorant why or
wherefore!"
Oscar was easily seized by the imperial mania. His dreams were of
dinners at the sovereign's table, of the run of the palace, princely
estates, and diamond snuff-boxes. According to him, art had never
received such patronage as from Napoleon: and he greatly
distressed and alarmed his friend Jérome, by spouting under gas-
lamps highly-coloured harangues concerning the marvels of the
imperial palace, and of the King of Rome's baptism. As Paturot drags
him away one evening from his al-fresco audience, they are followed
and accosted by Comtois, who carries them off to a wine-house, to
make an important communication to the general, as he persists in
calling Oscar since the memorable day at the Hotel de Ville. The
Emperor, he solemnly and mysteriously informs the friends, has
arrived in Paris. His exact whereabout in the capital is not known.
Some say he is in the lanterne at the Pantheon, examining the city
with his telescope; others are positive he has gone down into the
Catacombs at the head of 42,000 Indians: but the general opinion,
according to Comtois, is, that he has a plan for reducing Paris in
three minutes by the clock. Comtois is of such evident good faith,
that Paturot tries to undeceive him, telling him the Emperor is dead.
Thereupon the giant smiles contemptuously, and, when Jérome
persists, he looks upon him with suspicion. Then he condescends to
give the reason of his credulity. His father had served in the
dragoons of the Empress, and had stood sentry a hundred times at
Napoleon's door, had followed him to the wars, had never left him,
in short. "Comtois,"—these had been his last words to his son
—"when they tell you the Emperor is dead, answer at once 'It is a lie
of the enemy. The English spread the report; it is their interest to do
so.' Yes, my son, though you be alone and unsupported, always
maintain he is not dead, and add that he will come back. In the
court-yard of Fontainebleau he promised us he would, and he has
never broken his promise."—"You understand, general," concluded
Comtois to Oscar; "after that, there is not a word to be said. What
can you have stronger than that?—a dragoon of the Empress, a
mustache that grew gray in the service of the Emperor. It is
authentic, at any rate." In the midst of this curious conversation, a
private cab drives up to the door, and a gentleman sends in for
Comtois, who presently returns, his face beaming with joy. The
Emperor has inquired after him—after him, Comtois, native of
Baume-les-Dames, son of a dragoon of the Empress! Who would not
fight for such a man? Comtois is ready to empty his veins in his
service. In a few days the coronation will take place—the Pope will
come to Rheims on purpose—the Emperor has one thousand five
hundred millions in his pocket to distribute to the needy, and has
decided there shall be no more poor. All opposition will be in vain.
Comtois is well assured England will scatter gold in Paris to raise
opponents to Napoleon; but what then?—the imperialists are not
without means of stimulating the people. And thereupon Comtois,
after assuring himself there are no eavesdroppers, draws from under
his blouse—a magnificent stuffed eagle. With this on the top of a
flagstaff, and his father's uniform on his back, Comtois feels himself
invincible. Paturot is unfeeling enough to inquire if he proposes
exhibiting it for money. Comtois indignantly repudiates the idea. "It
is our banner, sir," he says; "our banner for the great day. By it the
sons of the Empire will be recognised. See the noble bird, the
glorious fowl! I have already cut a pole to stick it upon. As to the
tricolor flag, every body has got that. One government hands it over
to another. But the eagle! the eagle is not so easily tamed; it has but
one master, and that is the Emperor. The Emperor is come back, it is
the eagle's turn!"
And Comtois departed, ready to brave any odds on behalf of his
Emperor, and under shadow of the eagle's wing. "We have seen,"
says M. Reybaud, "how he understood the plot in which he was
associated. This illusion was common at the time. More than one
Parisian artisan, more than one villager of western France, believed
he deposited in the electoral urn a vote in favour of the Emperor.
The name preserved all its prestige, but did not delegate it. The
inheritance was too heavy to support. It resembled the iron crown;
none might touch it with impunity. There was much obscurity and
misconception in what then occurred; more than one appeal was
made to ignorance and credulity. The stuffed eagle had found a
victim, the living eagle made others. Ambition played its part, and
more than one personage beheld, in the perspective of the plot,
visions of grand-crosses and senatorships."
We find M. Reybaud too veracious, in other parts of the book, to cast
a doubt on his assertion that, in the year 1848, and in Paris, after
Napoleon's coffin has been opened at Courbevoie, and his corpse
deposited in the church of the Invalids, there still are to be found
men sufficiently stupid and credulous to believe the Emperor alive,
and to await his return. In the provinces, and especially in those
most remote from the capital, we know, from actual observation,
that within a very few years the Emperor's existence was an article
of faith with thousands, who, like Comtois, looked upon the report of
his death as a mere invention of the enemy. Although the imperial
veterans are now scarcely more plentiful in France than the
Peninsular heroes in this country, there still remain a sprinkling, who
infect their children and grandchildren with their own superstitious
fancies regarding Napoleon. The lower classes of provincial
Frenchmen are not remarkable for intelligence, and they receive the
traditions of the vieux de l'Empire, collected under the summer-
porch, and in the winter-night's gossip, with a sort of semi-credence
which a trifling corroborative circumstance ripens into implicit belief.
The mutilated, red-ribboned relic of the Grande Armée, who tells,
from beneath the shadow of the domestic vine, or from the bench at
the auberge door, such thrilling tales of past campaigns, of Austerlitz'
glory and Moscow's snows, shakes his gray head doubtingly when he
hears it said that Napoleon has perished, a captive and in solitude,
on a rock of the distant ocean. The gesture is not lost on the gaping
bumpkins, who greedily devour the old man's reminiscences. They
muse on the matter whilst tracing the next morning's furrow, or
perhaps, taken next day by the greedy conscription, they meet, at
the regiment, some ancient corporal who confirms the impression
they have received. The traditions of the barrack-room are all
imperial; how should they be otherwise? Were not those the days
when every recruit went to battle with a marshal's baton in his
havre-sack,—when no rank, honours, or riches were beyond the
grasp of the daring and fortunate soldier? The six years' service
expires; the soldier returns to his plough—an election arrives, the
name of Napoleon is every where placarded—interested persons tell
the newly-fledged voter, as the gentleman in the cab told Comtois,
that the Petit Tondu has returned to France. The soldat-laboureur,
whose prejudices are much strengthened, and his intelligence but
little brightened, by his term of military service, doubts, hopes, is
bewildered, and finally, in the uncertainty, votes for a stuffed bird
instead of a genuine eagle.
We have dwelt so long upon Jérome Paturot that we can afford but a
few lines to his brother in hosiery. Poor Monsieur Bonardin! Never,
since humanity first took to stocking-wearing, was a vender of that
useful article more scurvily treated than he was by the French
republic of 1848. The 25th of February beheld him a prosperous
man and an ardent republican,—"a republican of the morrow,"
certainly, but no worse for that; four months of liberty and fraternity
brought him to ruin and suicide. At first, all his anticipations are
rose-coloured. Increase of trade, an unlimited demand for hosiery,
must be the consequences of the new order of things. He is fully
persuaded great days are coming for the renowned establishment at
the sign of the Spinning Monkey. The day after the revolution he
opens his shop as usual, but only to be bullied by an ouvrier who
steps in to buy a red cap, finds none but white, curses Bonardin for
a Carlist, and carries off his national guardsman's musket. Uproar
recommences in the street; the shop is shut, and continues so for
some days. The end of the month arrives; there are payments to be
made, and M. Bonardin sends Criquet to the bank with bills for
discount—first-rate paper at short date. Criquet brings them back;
the best signatures no longer find cash. M. Bonardin is in all the
agonies of a punctual paymaster who sees a chance of his
signature's dishonour, when suddenly he is summoned to his duty as
national guard. On his return, after a sleepless night and a fagging
day, he has scarcely got amongst the blankets, when he is roused by
voices in the street calling out, in a measured chant, for lamps at his
windows.
M. Bonardin, awaking in alarm, and jumping out of bed—
What is that? (Cries in the street, 'Des lampions! des lampions!')
Good! here they are again with their infernal lamps! Impossible to
sleep under this republic!
Voices of boys in the street.—Hallo! first floor! Spinning Monkey!
Lamps! lamps!
M. Bonardin.—What a nuisance! (calling out)—Babet! Babet!
The boys shouting,—Lamps or candles!... break the ugly monkey's
windows, if he does not light up directly!
M. Bonardin.—Lord bless me!... Babet! Babet!...
Babet, (running in,)—What is it, sir?
M. Bonardin.—Don't you hear them? Cut a candle in eight pieces
directly. Not a minute to lose!
The boys.—It's a Carlisse, (Carlist.) Hallo, there! lamps or candles!
M. Bonardin, (in his nightgown, opening the window.)—Directly,
citizens, directly! A minute's patience!
The boys.—Ah! there's the old monkey himself! Bravo! bravo!
'D'un sang impur engraissons nos sillons!'
M. Bonardin, (flourishing his nightcap.)—Yes, yes, my friends, d'un
sang impur!... Certainly, by all means; Vive la République!
The boys.—Vive la République! Down with the Carlisses! (Babet
enters with candle-ends; M. Bonardin retreats behind his bed-
curtains.) Ah! there's the monkey's wife lighting up at last. Bravo!
bravo! Vive la République! The monkey's wife not bad-looking in her
night-dress!
Babet, (shutting the window.)—Do you hear, sir, those ragamuffins
call me your wife?
M. Bonardin.—Well! are you not flattered?
Babet.—Yes, indeed, the monkey's wife! It's flattering! They take me
for an ape, then?
M. Bonardin.—If they will only let me sleep at last. Midnight already.
Babet.—Pray, sir, is this to last long? This is our sixth illumination. A
whole packet of fives gone already!
M. Bonardin.—No, no, Babet—it is only the first moment. Recollect,
the republic is but ten days old.... A single decade, no more.
Babet.—A proper business it has been, your decade! Alarms at every
hour of the day and night; the shop shut three-quarters of the time,
and no buyers when it is open! A nice decade! And then the bank,
that refuses your paper; and then your bills, which you can't pay;
and then ...
M. Bonardin.—Let me sleep, my poor Babet.... All that is very true;
but what matter? We have got the republic; and you know as well as
I do—THERE ARE NO ROSES WITHOUT THORNS."
With this trite saying, the epigraph of the book, Bonardin, a bit of a
philosopher in his way, consoles himself, at the close of each
disastrous decade, for the annoyances and calamities he has
experienced in its course. These are countless, and of every kind.
Now it is a polite note from the tax-gatherer, requesting him to pay
down, in advance, the whole of the year's taxes, including an
extraordinary contribution just decreed by government. Then
Criquet, who has imbibed communist principles, insists on sharing
his master's profits, and M. Bonardin is afraid to refuse. Criquet,
however, is glad to fall back upon his wages, on finding that, instead
of profit, the shop leaves a heavy loss. Next comes a scamp of a
nephew, emancipated from Clichy by the abolition of imprisonment
for debt, who gets his uncle into various scrapes; and a drunken
godson, one Pacot, a soldier, who knocks his sponsor under the
table, on pretence of his being reactionary. Bonardin goes to Rouen
to assist at a wedding, and the railway takes him into a cross-fire,
the town being in full revolution. Rent-day arrives, and he sets out
as usual with receipts and a canvass-bag to collect the quarter's rent
from the occupants of the five upper stories of his house; but
nobody pays. The workman in the attics takes the receipt and
refuses the money, threatening to hang out the black flag if his
landlord insists. One tenant feigns madness—another declares
himself ruined—a third denies himself. Poor Bonardin returns home
with a heavy heart and an empty bag. In short, his misfortunes are
innumerable. He is mixed up in revolts against his will, and without
his knowledge; is sent to prison, thumped with musket-buts, hidden
in a cask, robbed in the national workshop. Finally, at the end of the
thirteenth decade, he stands upon the bridge leading to the National
Assembly, his face partly concealed by a handkerchief, singing
republican songs and asking alms. None give them. "I am a
proprietor, my poor man," says one; "I can give you nothing."
"Impossible, my good fellow," says the next; "I am a manufacturer."
"No change," says a third; "I am a shopkeeper, and I sell nothing."
"Sorry for you, my friend," replies another, "but I am an artist. In
these times, that is as much as to tell you I have not a sou in the
world." "Alas!" exclaims a fifth, "I would relieve you with pleasure,
but I am a poor employé, and the revolution has struck off a quarter
of my salary." "What ill luck!" cries Bonardin; "the revolution has
ruined every body, it seems. But this is about the time when the
representatives of the people repair to the National Assembly. They
are generous, the worthy representatives. The millions they daily
vote away sufficiently prove it. Courage! people who spend so many
millions will perhaps give me a few coppers." He is mistaken; the
deputies pass, but none give him any thing; whereupon he
concludes they have not yet received their five-and-twenty francs.
And as the republic will not give him bread, he resolves to seek
water in the river, climbs the parapet, and throws himself into the
Seine—thus tragically terminating the volume, which, up to that
point, is a farce, both broad and long, crammed with jokes and
double-entendres of various merit, but all exhibiting, in a light as
unfavourable as it is true, the disastrous effects of the revolution
upon the trade and prosperity of Paris.
We hoped to have included in this review the fourth volume of
Jérome Paturot, but it has not yet reached us, only a portion of it
being published. The work comes out in parts, and it is said the
fourth volume will be the last of the series. In that case, it will
probably close with the June revolt. If M. Reybaud likes, and dares,
he may find in subsequent events abundant food for his satirical
chronicle. Perhaps he will think fit to wait Cavaignac's exit before
criticising his performance. There are numerous points in the brief
history of the republic upon which he has not yet touched. We hope
yet to accompany Jérome to the cell of an imprisoned journalist, to
the court-martials upon the June insurgents, to debates in the
Assembly, and to consultations in the cabinet. A retrospective flight
to the days of the Convention, and an incidental inquiry into the
antecedents of M. Cavaignac the father, of whose exploits the son
has expressed himself so proud, were not without interest. But the
subject we are especially curious to see M. Reybaud take up, is that
of French journalism in 1848. He might fill a most amusing volume
with an elucidation of its mysteries and rivalries; and we cannot
believe, after reading the bold judgments and revelations contained
in the three published volumes of Jérome, that he would be deterred
from the task by apprehension of editorial wrath, whether expressed
in the field or in the feuilleton, by a challenge or a criticism.
PROPHECIES FOR THE PRESENT.
Prophecies and miracles, we are told, have long since ceased upon
the earth, as permitted only, by Divine goodness, to those ages
when faith was not firmly established, and revelation needed the
active and visible interference of Divine influence to make its way
into the heart of obstinate and denying man. This is a doctrine
which, in these present times of reason, we are naturally inclined to
accept. But yet there are circumstances, occurring even in our day,
which sometimes surprise the imagination, and even startle that
reason which is so ready to assert its supremacy. It is thus that we
have regarded with much curiosity, more wonder, and an impression
which it is difficult to drive away from our minds, certain strange
documents relative to the most important events of modern history,
which, if their authenticity be accepted, are among the most striking
revelations emanating from a prophetic spirit. They appear before us
avowed prophecies, coming from seemingly well-authenticated
sources, and backed by such assurances in the genuineness of their
antiquity, from credible mouths, as takes off from them that paulo-
post-future sort of suspicion, that inevitably attaches itself to
predictions, which make their appearance to the world after
fulfilment. In laying them before our readers, we are able to offer
some little proof, as far as it goes, in support of their authenticity;
and we still call to them the attention of those who may
nevertheless refuse their credence, as highly interesting documents
of a strange character, relating to past, present, and even future
political events. As they do, in truth, refer also to a future still to be
accomplished, as well as to the present, our readers, it is to be
hoped, may be able to judge for themselves how far the predictions
as to the future will bear out those which now already relate to the
past, and to what, if such an expression may be pardoned, might be
called the present just gone by.
Two of these revelations bear the character of direct and avowed
prophecies, given as such by holy men, and are imbued throughout
with that mystic spirit, which, however incomprehensible as regards
the future, becomes clear to an extraordinary degree of distinctness
when applied to the test of the past: they wear, in fact, the strange
air of predictions never intended to be comprehended until after
their fulfilment; as if, even although the inspired soul of certain
individual men had been permitted to raise itself, in its ecstasy, from
the earth into those unknown realms where past and future are
confounded in eternity, and shake off for the time the mortal
trammels of our limited understanding, but retain still afterwards the
consciousness and the power to reveal what there it saw; yet, by
some mysterious dispensation, the revelations should not be allowed
to be expounded in the clearness of their truth, so as to be
comprehensible to the intellects of the uninspired and undeserving
herd. Why, then, should the future be revealed, it might be asked, if
the revelation should serve nothing to mankind? With such deep and
awful mysteries we have not to deal: we cannot answer: we are of
the blind who cannot lead the blind. At all events, if these
documents be forgeries—mere devices fabricated after facts—and
that they cannot be so entirely, will be seen hereafter—certainly a
degree of genius that is almost incomprehensible presided over their
fabrication, with this strange stamp of vague oracular language,
which is only comprehensible in its after-application.
Such are two of these prophetic writings. As they are supposed to
proceed from the mouths of religious men, renowned for the sanctity
of their lives, they naturally refer more to the condition of the
Christian church, and to the fate of the "faithful," than immediately
to political events; but yet so closely is the destiny of the faithful of
the Christian world mixed up inevitably with the destiny of men and
countries in general, that the political events of our day are there set
down in prediction, with all the minuteness which the vague and
mystic language of prophetic revelation, dimly depicting what even
the inspired eye can only dimly trace in cloudy vision, "through a
glass darkly," is able to bestow upon detail. The third revelation
assumes to be no more than an interpretation of the prophetical
book of the New Testament, and repudiates all supposition of aiming
at any spirit of prophecy in itself; a portion, however, of this
interpretation of a part of Scripture so obscure as the book of the
Revelation, is so remarkable in its application to present events, as
to wear the very air of prophecy that its interpreter repudiates.
The longer and more important of the two prophecies, which have
both appeared in France, and refer chiefly to events immediately
connected with French history, is one popularly designated as the
"Prophecy of Orval:" it has been already translated into English, and
published,[12] with a preface, an introduction, and explanatory
notes, chiefly referring to the authenticity of the document, and to
its possession in the hands of a variety of credible and respectable
persons during the whole of the present century, and some of the
later years of the last. The little pamphlet has been got up with
much intelligence, and apparently with a strictly conscientious spirit.
We cannot here follow the editor through all the details he lays
before us, to prove that the prophecy has been copied from a book
printed at Luxembourg in the year 1544, and recopied, by gentlemen
of standing and respectability, from copies already made, as early as
the year 1792—or through all the evidence adduced, some years
ago, in such respectable religious French papers as the Invariable,
and the Propagateur de la Foi, accompanied by notes from the editor
himself, with regard to his own personal experience, and the
testimony he has received from personages worthy of the highest
credit, known to himself. It may be said, however, that he
communicates extracts of letters and other authorities, which, could
they be forgeries, would assuredly be some of the most ingenious of
the kind, even if they had any great end or aim in their fabrication;
and it ought to be added, that a great part of this testimony is
compiled from a brochure called The Oracle for 1840, and published
by a certain Henry Dujardin in Paris, in the month of March 1840,
consequently anterior, at all events, to the remarkable circumstances
of the present day. On these matters we must refer our readers to
the interesting little pamphlet itself. The authority upon which rests
the fact that the prophecy, generally known under the title of "Les
Prévisions d'Orval," and entitled "Certain Previsions revealed by God
to a Solitary, for the Consolation of the Children of God," was
actually printed at Luxembourg in the year 1544, seems every way
as conclusive as possible in such matters of ancient lore; and the
writer of this present paper has only to add that he himself has seen
in Paris the whole prophecy, as far as it is still in existence, printed in
a newspaper of the year 1839, (he believes, as far as his memory
reaches, in the Journal des Villes et des Campagnes), and
consequently, to his own knowledge, published to the world
previously, at least, to the events of the present year; that an old
English lady, upon whose faith he can implicitly rely, positively
declared to him that she had it in her hands as early as the year
1802, and thus even before the crowning of Napoleon as Emperor;
and that its reappearance, since the breaking out of the revolution of
this year, excited so much sensation in the French capital, that
measures were taken by the republican government of the day to
establish a sort of surveillance over persons known to possess and
propagate the prediction—a fact also mentioned by the editor of the
English pamphlet—as conspirators against the stability of the
republic. With these premises, we proceed to do no more than lay
before our readers the prophecy in question, claiming for the notice
that follows such credence as every man's conviction or scepticism,
imagination or cooler reason, may choose to bestow.
The Abbey of Orval, from which the prediction has taken its title,
was, it appears, a religious institution, situated in the diocese of
Treves, on the frontiers of Luxembourg; and it is said that the abbot
and the monks, when they fled from their convent, during the siege
of Luxembourg by the French revolutionary army, to the "refuge" in
the town, conveying a part of their archives as well as their sacred
vessels with them, first communicated the printed copy of the
Previsions of a Solitary of 1544 to Marshal Bender, who commanded
the army, and other French gentlemen, by whom copies were then
taken as a matter of curiosity, and put in circulation. Tradition at that
time attributed the prediction to a monk of the name of Philip
Olivarius, although the exact period of the existence of the "Solitary"
does not appear to have been well known. What at present remains,
or is supposed to remain, commences only with the history of
Napoleon Buonaparte, although the "Oracle" of Henri Dujardin
speaks of the prediction relative to the death of Louis XVI. as having
excited considerable sensation among the emigrant circles of that
time; and the circumstance of the absence of any events anterior to
the prophecy, as it stands at present, is accounted for by a remark
made in the Propagateur de la Foi, that, when it was discovered, at
the conclusion of the last century, the copyists generally neglected to
transcribe what related to the past, and contented themselves only
with that portion, the accomplishment of which was still to come.
The prophecy, as will be seen, astoundingly and suspiciously minute
in its details; but yet, when the predictions as to the future are
considered—to our eyes at present so vague and mysterious, and
still perhaps in their fulfilment, if so it should prove, as exact in
detail,—it may well be imagined that the portions which now refer to
the past, may in their day have appeared equally mysterious and
vague. It runs as follows, as it now stands:—
"At that time a young man, come from beyond the sea into the
country of Celtic Gaul, shows himself strong in counsel. But the
mighty to whom he gives umbrage will send him to combat in the
land of Captivity. Victory will bring him back. The sons of Brutus will
be confounded at his approach, for he will overpower them, and
take the name of emperor. Many high and mighty kings will be sorely
afraid, for the eagle will carry off many sceptres and crowns. Men on
foot and horse, carrying blood-stained eagles, and as numerous as
gnats in the air, will run with him throughout Europe, which will be
filled with consternation and carnage; for he will be so powerful, that
God shall be thought to combat on his side. The church of God, in
great desolation, will be somewhat comforted, for she shall see her
temples opened again to her lost sheep, and God praised. But all is
over, the moons are passed."
It must be remarked here, that the moons, continually alluded to in
the prophecy, may be found, by the calculation of thirteen lunar
mouths to a year, to arrive at an extraordinary accuracy of prediction
as to the date of the events prophesied: those which have been
mentioned above must be considered to refer probably to a period of
time alluded to in the portion of the "Previsions" supposed to be lost.
"But all is over; the moons are passed. The old man of Sion cries to
God from his afflicted heart; and behold! the mighty one is blinded
for his crimes. He leaves the great city with an army so mighty, that
none ever was seen to be compared to it. But no warrior will be able
to withstand the power of the heavens; and behold! the third part,
and again the third part, of his army has perished by the cold of the
Almighty. Two lustres have passed since the age of desolation; the
widows and the orphans have cried aloud to the Lord, and behold!
God is no longer deaf. The mighty, that have been humbled, take
courage, and combine to overthrow the man of power. Behold, the
ancient blood of centuries is with them, and resumes its place and
its abode in the great city; the great man returns humbled to the
country beyond the sea from which he came. God alone is great!
The eleventh moon has not yet shone, and the bloody scourge of
the Lord returns to the great city; the ancient blood quits it. God
alone is great! He loves his people, and has blood in abhorrence; the
fifth moon has shone upon many warriors from the east. Gaul is
covered with men, and with machines of war; all is finished with the
man of the sea. Behold again returned the ancient blood of the Cap!
God ordains peace, that His holy name be blessed. Therefore shall
great peace reign throughout Celtic Gaul. The white flower is greatly
in honour, and the temples of the Lord resound with many holy
canticles. But the sons of Brutus view with anger the white flower,
and obtain a powerful edict, and God in consequence is angry on
account of the elect, and because the holy day is much profaned;
nevertheless God will await a return to Him during eighteen times
twelve moons. God alone is great! He purifies His people by many
tribulations; but an end will also come upon the wicked. At this time
a great conspiracy against the white flower moves in the dark, by
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like