Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by BlobbyPops · Mar 31, 2010 at 05:17 AM · standalonecommunicationinterop

What options do we have for interprocess communication ?

Hello,

I would like my unity standalone application to receive large buffers of data from another C# application running on the same PC computer.

What options do we have available through Mono (without using plugins or .net remoting) ?

Interprocess TCP communication seems the obvious choice but isn't there anything faster/simpler ?

Named pipes being a .net 3.5 feature, no chance.

Any idea or advice would be most welcome.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by AngryAnt · Mar 31, 2010 at 09:17 AM

If you do not require the other process to be running before the Unity one, you could have your Unity project launch that via Process and then redirect stdin/out to streams and communicate through these.

Example:

Process otherProcess = new Process (); otherProcess.StartInfo.FileName = path; otherProcess.StartInfo.CreateNoWindow = true; otherProcess.StartInfo.UseShellExecute = false; otherProcess.StartInfo.RedirectStandardInput = true; otherProcess.StartInfo.RedirectStandardOutput = true;

// Now communicate via streams // otherProcess.StandardOutput // and // otherProcess.StandardInput

It is also possible that grabbing a running process by name or pid and then setting the forwarding would work, but I've not tested this and it does seem rather doubtful.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image BlobbyPops · Mar 31, 2010 at 03:33 PM 0
Share

This looks like a nice trick. Do you think it would be faster or slower than TCP communication ?

avatar image
2

Answer by qJake · Mar 31, 2010 at 08:31 AM

You could use a TCP process, and that's likely your best bet. The loopback interface on most computers is fast enough to handle large amounts of data.

For generalized interprocess communication information, refer to this handy MSDN reference page. Some examples (like named pipes, as you mentioned) will be in newer .NET versions, but I'm sure there's something there that you could use.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Possible to communicate from HTML to unity standalone app? 3 Answers

Problem web service / standalone 1 Answer

OSX Build cannot go fullscreen? 0 Answers

Shader EnableKeyword Standalone version 0 Answers

Game crash on Ubuntu 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges