Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6857929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:05:36+00:00 2026-05-27T02:05:36+00:00

Suppose we have a service with the following methods. [ServiceContract(SessionMode = SessionMode.Required, CallbackContract =

  • 0

Suppose we have a service with the following methods.

[ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(ISampleServiceCallback))]
interface ISampleService
{
    [OperationContract(IsOneWay = true, IsInitiating = true, IsTerminating = false)]
    void Connect(string version);

    [OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
    void Request(string uuid, string description);

    [OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = true)]
    void Disconnect();
}

interface ISampleServiceCallback
{
    [OperationContract(IsOneWay = true)]
    void Reply(string uuid, string description);
}

The client calls the Connect method and a new session starts between client and server.
During this session, the client may call the Request method… The server, after receiving the request message, if it is able to respond to the client, it sends a reply using the callback.

Suppose now that the two nodes are not a client and a server, but they are the two peers. How can I make two-way communication? I wish that each of the two nodes can call the Request of the other node … Is it possible?
In other words, one of the two nodes decide to create a new session with another node by calling the Connect method of the other node … if the latter accepts the connection, a new communication session is created, but both nodes must be able to call methods of the other node.

My idea was to create two sessions between the two nodes: in the first session the node A is the client, while node B is the server; the second session has the opposite direction: the node B is the client, while node A is the server.
However, in this way I have two TCP connections … Are there any alternatives?

Here is a chart that explains how it should work: http://imageshack.us/photo/my-images/600/multipleservices.png/

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:05:37+00:00Added an answer on May 27, 2026 at 2:05 am

    What you want is duplex communication, right? It depends on the binding, wether it is possible or not. You could use WsDualHttpBinding, but that is not recommended because it is not an official standard. Most of the Tcp Bindings support duplex. You find information here or on this post.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have the following methods declared in my web service: @WebMethod() public Long
Suppose I have the following (rather common) model Client invokes web service request ->
Suppose I have an asmx web service at the following address: http://localhost/BudgetWeb/Service.asmx This web
Suppose we have following packages in our project org.xxx.dao, org.xxx.service, org.xxx.service.impl all the package
Suppose I have the following 2 web service code, I think I can do
Suppose i have following WCF Services. UtilityService (Service to provide utility functions) SomeOtherService 1
Suppose I had a WCF service that I have coded up, like Clemens Vasters's
Suppose I have the following CSS rule in my page: body { font-family: Calibri,
Suppose I have BaseClass with public methods A and B, and I create DerivedClass
I have WCF service with IParameterInspector class which suppose to store the message for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.