Skip to Content
Coding4Fun
book

Coding4Fun

by Dan Fernandez, Brian Peek
November 2008
Intermediate to advanced
512 pages
12h 6m
English
O'Reilly Media, Inc.
Content preview from Coding4Fun

How PeerCast Works

Now that you've seen what PeerCast does, let's explain the technology that makes PeerCast work, including:

  • How Peer Channel applications work

  • Building the NetworkManager class

  • Listening to P2P events using Network Manager

  • Understanding how the login process works

  • Understanding how chat messages work

  • Understanding how video streaming works

  • Building the MainWindow.xaml UI

  • Adding the MainWindow.xaml code

How Peer Channel Applications Work

Before we get into any code, we need to explain, at a high level, how Peer Channel applications work.

Key P2P terms

This chapter is written assuming you have no previous experience building P2P applications, and so we'll start off by explaining the key terminology used in P2P applications:

C4FP2P

An abbreviation for the Coding4Fun peer-to-peer library that provides a wrapper of the Peer Channel protocol.

Mesh

An ad-hoc network of nodes with the same mesh name. When you run PeerCast, you'll enter a network name and password, which will create a custom mesh. The term "mesh" in this context has no relation to Microsoft Live Mesh.

NetPeerTcpBinding

A Windows Communication Foundation (WCF) class that implements the Peer Channel protocol.

Node

A computer, device, or application that uses the Peer Channel protocol. Any PC running PeerCast would be considered a node.

Peer-to-peer (P2P)

P2P applications use decentralized communication where clients communicate amongst peers instead of communicating to a central server.

Peer Channel

A protocol for building ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Hidden Cost of AI-Assisted Creativity

The Hidden Cost of AI-Assisted Creativity

Léonard Boussioux, Anil Doshi, Oliver Hauser, Kartik Hosanagar
How to Develop a Great Digital Strategy

How to Develop a Great Digital Strategy

Jeanne W. Ross, Cynthia M. Beath, Ina M. Sebastian
Are You an Authentic Leader or an Authentic Jerk?

Are You an Authentic Leader or an Authentic Jerk?

Hannes Leroy, Michael A. Daniels, Kristin L. Cullen-Lester, Alexandra Gerbasi

Publisher Resources

ISBN: 9780596155124Errata Page