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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:25:13+00:00 2026-05-13T22:25:13+00:00

I am trying to make an app that will pass data between two servers

  • 0

I am trying to make an app that will pass data between two servers Connection1 and Conenction2 using sockets.What i would like to do is receive data from Connection1 and pass it to Connection2 and vice-versa.Connection1 and Conenction2 are on different threads. What is the best way to call methods on different threads in order to pass data back and forth between them.Both threads will use the same message object type to communicate in both directions between them.

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-05-13T22:25:13+00:00Added an answer on May 13, 2026 at 10:25 pm

    You should use immutable data transfer objects.

    As long as a simple object is deeply immutable (meaning that neither it nor any of it’s properties can change), there is nothing wrong with using it on multiple threads.

    To pass the instances between threads, you might want to use a pseudo-mutable thread-safe stack. (This depends on your design)

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

Sidebar

Ask A Question

Stats

  • Questions 531k
  • Answers 531k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer echo preg_replace('/((?<!\be)n|n(?!d\b))/i', '<b>\1</b>', $string); It matches any letter 'n' that… May 16, 2026 at 11:52 pm
  • Editorial Team
    Editorial Team added an answer [ ]{2,} SPACE (2 or more) You could also check… May 16, 2026 at 11:52 pm
  • Editorial Team
    Editorial Team added an answer Using LINQ: var newDict = dict.Where(kvp => kvp.Value != 100)… May 16, 2026 at 11:52 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Trying to figure out a way where I can pass some data/fields from a
I want to make some buttons in my app that look like the common
I have an iPhone app accessing an ASP.NET Webservice for data. Since I'm building
I'm trying to fashion a solution which will simulate App_Offline.htm for remote access but
I use Google App Engine with datanucleus and JPA. I'm having a real hard
Here's what I'm trying to solve: My class (which could be hosted by an
I've a server with several IP Addresses assigned to the network adapter. On that
I don't want the phone to go to sleep so I am using: [
I'm developing a facebook app right now all by my lonesome. I'm attempting to
I'm creating a PHP library for a third-party site's REST API. The library will

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.