C# .NET Web Developer's Guide

Solutions Fast Track

Introducing Networking and Sockets

  • Networking is inter-process communication. Two or more processes communicate with each other. The processes can run on the same or different computers or other technical devices.

  • The most important networking API is the socket.

  • Most networks today use the Internet Protocol (IP) as base protocol. The most widely used application protocols are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). TCP and UDP run on IP.

  • TCP is a reliable connection- and stream-oriented point-to-point protocol. The communication is client/server oriented. The delivery and order of data is guaranteed.

  • UDP is a connection-less and datagram-oriented best-effort protocol. The delivery and order of data is not guaranteed. It can be used as a point-to-point protocol (unicasting) or as a point-to-group protocol (multicasting).

Example TCP Command Transmission and Processing

  • For TCP communication, the easiest way is to use the System.Net .TcpListener and System.Net.TcpClient classes.

  • This section showed how a TcpClient on the client side connects to a TcpListener on the server side.

  • The client sends a command and receives a result.

  • This is similar to a browser making a request to a Web server and receiving a Web page.

Example UDP Command Transmission and Processing

  • For UDP communication, the easiest way is to use the System.Net .UdpClient classes.

  • This section showed how a UdpClient on the client side communicates to another UdpClient on the server side. The client sends a command and receives a result.

  • This example is similar to...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Teleconferencing and Webcast Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.