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 8987401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:46:57+00:00 2026-06-15T21:46:57+00:00

This is a real question. I am working with named pipes to transmit data

  • 0

This is a real question.

I am working with named pipes to transmit data between processes/threads, but this data is of type string is is possible to pass and object this way?

Is there anyway to pass an object?

My problem is the following:

I have a thread Missile, and a Process World.
World receives the location of the Missile and returns the computation of the new location.

Right now I am doing this by taking information from the string writing in the pipe. Is there a way to pass this as an object or a tuple?

If anyone could help me with this, it would be great!
Thanks.

  • 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-15T21:46:59+00:00Added an answer on June 15, 2026 at 9:46 pm

    You can use the Marshal module to pass arbitrary OCaml values through a bytestream. It’s tricky to get right, so I’d advise reading the Marshal section of the manual. The main thing is that it only passes values, not types. So your receiving process will need to have a definition for the exact type of the object being passed, and you need to specify the type explicitly in the receiver.

    Values that contain functions, which includes OO-style objects, can’t be marshalled except between copies of the same program. Maybe this applies to your case (since you mention that you have a thread), but it might be better to use a tuple anyway.

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

Sidebar

Related Questions

So this should be a real easy question but I can't seem to find
Real noob question no doubt, but I can't get my head around this behaviour.
i'm working in VC++, but this is a basic C++ question ... I am
this is a real basic question but i was struggling at it from 30
This is a real newbie question. I have simple app that selects a picture
If this is not a real question then feel free to close ;)
I am sorry if this is more of a theory question then a real
This is not a real bug BUT for sure it is not what you
For the sake of this question, I don't care about the difference between stubs,
I'm having trouble wording this question (as you might see from the title), but

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.