WCF P2P example
Create empty c# Console project and add reference to System.ServiceModel Message interface and class [ServiceContract(CallbackContract = typeof (IMessage))] public interface IMessage { [OperationContract(IsOneWay = true )] void Send( string sender, string message); } class MessageImpl : IMessage { public string Name { get ; set ; } public MessageImpl( string name) { Name = name; } public void Send( string sender, string message) { if (!Name.Equals(sender)) { Console.WriteLine(" {0}: {1} ", sender, message); } } } Messenger public class Messenger { public string Name { get ; private set ; } public IMessage Channel; public IMessage Host; private DuplexChannelFactory<IMessage> _factory; private readonly AutoResetEvent _stopped = new AutoResetEvent( false ); private readonly AutoResetEvent _started = new AutoResetEvent( false ); pu...