VMuktiService Print

3.2 VMuktiService 

VMuktiService is a library which includes the classes and methods that provides the functionality of hosting Http and Net P2P wcf service and opening corresponding Duplex Channel Factory according to the current node type.

There are some classes in the VMuktiService namespace those are as follows:

 

                Figure 11


1)    BasicHttpClient is a class of VMuktiService , which include methods for opening basic Http Client. Following are the methods which provides the feature of opening client. 

Method 

Description 

OpenClient Creates and Opens the Http client channel 

CloseClient 

Closes the Http client channel. 

NewBasicHttpBinding 

Specifies the BasicHttpBindings client bindings.  

There is one field in the class which is as follows: 

Field 

Description 

Factory 

It is an object of DuplexChannelFactory , which is used to specify the Contract, Binding, Mesh Password and close the channels. 

2) BasicHttpServer is a class of VMuktiService , which include methods for opening basic Http service. Following are the methods which provides the feature of hosting     BasicHttpServer.

Method

Description 

AddEndPoint 

Creates new Http EndPoint 

OpenServer 

Opens the Service channels 

CloseServer 

Cloese the service channels. 

NewBasicHttpBinding 

Specifies the BasicHttpBinding server 

 

There is one of the object in this class which is as follows:

Object 

Description 

host 

It is an object of ServiceHost, which is used to handle the basic Http function from server side 

3)  NetPeerClient is a class of VMuktiService , which include methods for opening net p2p Client. Following are the methods which provides the feature of opening NET P2P client.  

Method 

Description 

OpenClient 

Creates and Opens the Net Peer client channel 

CloseClient 

Closes the Net Peer client channel. 

NewBinding 

Specifies the NetPeerTcpBinding client bindings.  

There is also one object in the NetPeerClient, which provide following functionality:

Object 

Description 

Factory 

It is an object DuplexChannelFactory , which is used to specify the contract , Binding , Mesh Password and close the channels.

4)    NetPeerServer is a class which includes the methods for the Net Peer Server.Those methods are as follows:

Method 

Description 

NetPeerServer 

Create new instance of the CustomPeerResolverService and ServiceHost 

AddEndPoint 

Creates new net Peer EndPoint 

OpenServer 

Opens the Net Peer server channel 

CloseServer 

Closes the Net Peer server channel. 

NewNetTcpBinding 

Specifies the NetPeerTcpBinding server bindings.  

There are also two fields in this class, those are as follows:

Field 

Description 

Cprs 

It is an object of CustomPeerResolverService , used to open , close server channels and used to provide services. 

Host 

It is an object of ServiceHost, which is used to handle the basic Http function from server side.