(March 7, 2003) - Networking is one of the core tasks of enterprise-level
programming, and for the programmer familiar with the C# language,
Professional .NET Network Programming will provide the information to put
network programming at the heart of their .NET applications. The following is
an excerpt from this recent book from Wrox Press.
A File Transfer Application
We have seen how to use the UdpClient class to send and receive datagrams,
and we created a chat application using the same principle. Next, we'll see
how to transfer a file and serialized object using UdpClient. The sender and
receiver programs are divided into two logical parts. In the first part, the
sender sends file details (namely the file extension and file size) to the
receiver(s) as a serialized object, and in the second part the actual file is
sent to the destination. In the receiver, the fir... (more)