Socket Programming
After this first theoretical overview, let's move on to look at the Mono framework and see how sockets can be used. Although a lot of effort is put into n-tier applications, classical client/server applications are still widely used.
As you know, client/server applications consist of two processes. The server process provides data for the client. The server processes requests and returns the results. In most practical applications, a server is supposed to process requests concurrently.
In this section, we examine how simple server and client applications can be implemented.
Simple TCP Servers
We start with a simple scenario. The server waits for data and terminates as soon as data is received.
using System; using System.Net.Sockets; ...
Get Mono Kick Start now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.