11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 12 ■ DEVELOPING PEER-TO-PEER APPLICATIONS WITH WCF 383ramrameshreddy.blog.comListing 12-1. IQuickReturnTraderChat Service Contract[ServiceContract()]public interface IQuickReturnTraderChat{[OperationContract(IsOneWay = true)]void Say(string user, string message);}Service ConfigurationListing 12-2 shows the service side of the configuration. This application listens at the net.p2p//QuickReturnTraderChat address. Being a P2P application, the binding is set to netPeerTcpBinding,and the contract for the endpoint is set to QuickReturnTraderChat.IQuickReturnTraderChat,which follows the Namespace.Interface format. The binding configuration is intentionally keptseparate (shown later in Listing 12-3).Listing 12-2. Service ConfigurationBinding Configuration FileAs we stated earlier, a P2P application’s binding is set to netPeerTcpBinding and the resolvermode to Pnrp (see Listing 12-3). Since this application is not secure, we have the security modeswitched off by setting this to None.ramrameshreddyramrameshreddy

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!