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

  • SEARCH
  • Home
  • 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 8728649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:41:18+00:00 2026-06-13T08:41:18+00:00

I’m trying to make a distributed system where a client sends some information to

  • 0

I’m trying to make a distributed system where a client sends some information to one server, the server receives the message and forwards it to all other servers.
The system utilises RPC and XDR as it’s interface definition language.

I got the part where the server receives the message. But I’m unable to forward the message to other servers. Even if I manage to forward the message, it’s only printed if the client also sends a message to that specific server, i.e., along with that message.

For Ex: If I send a message Hello to server A and server A is supposed to forward it to server B as well. Server B gets the message and doesnot print it. Instead, when I send a message Hi to server B, it prints
HELLOHI.
That means B got the message and didn’t quite print it.

Any suggestions as to why that might be happening? I’m using rpc_broadcast to broadcast the message received from client to other servers.

Edit1: Here’s the method that I try to call when a broadcast is received by all servers. I’m jus trying to print a static HELLO THERE to see if it’s working before implementing my logic there.

int *
pass_details_1_svc (xaction_args *argp, struct svc_req *rqstp)
{
    int *i;
   printf("HELLO THERE");   
   return i;
}

And here’s the rpc_broadcast call that I do when I receive a message from the client:

xaction_args ag; ag.passMsg=”Hello”;
rpc_broadcast(others,TICKER_PROG,TICKER_VERS,PASS_DETAILS,(xdrproc_t)xdr_xaction_args,&ag);

passMsg is a variable in the structure defined in the XDR file.

  • 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-06-13T08:41:19+00:00Added an answer on June 13, 2026 at 8:41 am

    Adding \n works because it flushes your current printf buffer. When you normally call printf, it is not necessary that OS immediately outputs that too. It can buffer for a while and execute at some unpredictable time. Flushing out the print buffer ensures immediate printing.

    Alternately you could have used some system call which is not buffered, for instance perror()

    So it’s not kinda funny, it is standard logical behavior by design

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.