Posts

Showing posts from November 15, 2009

Windows Communication Foundation Architecture Overview

Image
Summary: Get a high-level view of the Windows Communication Foundation (WCF) architecture and its key concepts. Code examples demonstrate WCF contracts, endpoints, and behaviors. (17 printed pages) Introduction This document provides a high-level view of the Windows Communication Foundation (WCF) architecture. It is intended to explain key concepts in WCF and how they fit together. There are a few code examples to further illustrate the concepts, but code is not the emphasis of this document. The rest of this document is organized in two main sections: WCF Fundamentals: Covers key concepts in WCF, terms, and architectural components. Code Examples: Provides a few short code examples intended to illustrate and reify the concepts covered in WCF Fundamentals. WCF Fundamentals A WCF Service is a program that exposes a collection of Endpoint s. Each Endpoint is a portal for communicating with the world. A Client is a program that exchanges messages with one or more Endpoints

CLIENT / SERVER : Simple File Sharing and File Transfer

Image
This article will demostrate a simple file sharing technique between 2 computers using sockets. A client can search and download a file shared by the server and a server can search and download a file shared by the client SERVER Two computers can transfer file with each other over a socket connection. A server computer opens a socket connection and listens on a pre-defined port for imcoming client connection. Once a connection is establised a client and server can handshake using simple commands to search files and initiate a transfer. To being using sockets in the application , use System.Net namespace using System.Net; using System.Net.Sockets; Create the server socket of the type Stream and using the TCP protocol. serversocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); serversocket.Blocking = true ; Bind the Server to the port and keep listening on the port for client connections ..

An Introduction to Socket Programming in .NET using C#

Introduction In this article, we will learn the basics of socket programming in .NET Framework using C#. Secondly, we will create a small application consisting of a server and a client, which will communicate using TCP and UDP protocols. Pre-requisites Must be familiar with .NET Framework. Should have good knowledge of C#. Basic knowledge of socket programming. 1.1 Networking basics: Inter-Process Communication i.e. the capability of two or more physically connected machines to exchange data, plays a very important role in enterprise software development. TCP/IP is the most common standard adopted for such communication. Under TCP/IP each machine is identified by a unique 4 byte integer referred to as its IP address (usually formatted as 192.168.0.101). For easy remembrance, this IP address is mostly bound to a user-friendly host name. The program below ( showip.cs ) uses the System.Net.Dns class to display the IP address of the machine whose name is passed in the firs