interprocess

Boost, Shared Memory and Vectors

一笑奈何 提交于 2019-12-03 13:31:56
问题 I need to share a stack of strings between processes (possibly more complex objects in the future). I've decided to use boost::interprocess but I can't get it to work. I'm sure it's because I'm not understanding something. I followed their example, but I would really appreciate it if someone with experience with using that library can have a look at my code and tell me what's wrong. The problem is it seems to work but after a few iterations I get all kinds of exceptions both on the reader

Boost Message Queue not based on POSIX message queue? Impossible to select(2)?

可紊 提交于 2019-12-03 12:46:51
I thought I'd use Boost.Interprocess's Message Queue in place of sockets for communication within one host. But after digging into it, it seems that this library for some reason eschews the POSIX message queue facility (which my Linux system supports), and instead is implemented on top of POSIX shared memory. The interface is similar enough that you might not guess this right away, but it seems to be the case. The downside for me is that shared memory obtained via shm_open(3) does not appear to be usable with select(2) , as opposed to POSIX message queues obtained via mq_open(3) . It seems

Is there a difference between boost iostream mapped file and boost interprocess mapped file?

醉酒当歌 提交于 2019-12-03 11:58:37
问题 I want to create a mapped binary file into memory; however I am not sure how to create the file to be mapped into the system. I read the documentation several times and realize there are 2 mapped file implementations, one in iostream and the other in interprocess. Do you guys have any idea on how to create a mapped file into shared memory? I am trying to allow a multi-threaded program to read an array of large double written in a binary file format. Also what is the difference between the

When doing IPC using TCP/IP sockets using the loopback address, do common networking stacks skip framing the message in lower-level PDUs?

百般思念 提交于 2019-12-03 09:08:28
问题 In some environments such as Java, it's natural to use TCP/IP sockets to pass messages between processes on the same host using the 'localhost' address (127.0.0.1 in IPv4, or ::1 in IPv6). (Because Java tends not to expose other IPC mechanisms in its API). Clearly, this has the potential to be a lot slower than IPC via message passing over pipes, or IPC using shared-memory. On the other hand, if the TCP/IP networking stack realised that both ends of the connection were on the loopback

Is communication between two ruby processes possible/easy?

丶灬走出姿态 提交于 2019-12-03 08:46:36
If I have a ruby script Daemon that, as it's name implies, runs as a daemon, monitoring parts of the system and able to perform commands which require authentication, for example changing permissions, is there an easy way to have a second ruby script, say client , communicate to that script and send it commands / ask for information? I'm looking for a built in ruby way of doing this, I'd prefer to avoid building my own server protocol here. Ruby provides many mechanisms for this including your standards such as: sockets , pipes , shared memory . But ruby also has a higher level library

How to start an Android activity from a Unity Application?

我的未来我决定 提交于 2019-12-03 04:22:38
问题 I know this seems to be a trivial question but I could not find any concrete answer anywhere on the internet. I saw this very similar question on stackoverflow: How to start Unity application from android activity? but it is exactly opposite from my question. Additionally the android activity must be able to receive some input strings from the Unity application much like how one use system() calls with line arguments to start another program on a PC. The following is the code I have for a

Is there a difference between boost iostream mapped file and boost interprocess mapped file?

故事扮演 提交于 2019-12-03 02:28:28
I want to create a mapped binary file into memory; however I am not sure how to create the file to be mapped into the system. I read the documentation several times and realize there are 2 mapped file implementations, one in iostream and the other in interprocess. Do you guys have any idea on how to create a mapped file into shared memory? I am trying to allow a multi-threaded program to read an array of large double written in a binary file format. Also what is the difference between the mapped file in iostream and interprocess? Joe D As far as I can tell, iostreams will place the mapped file

How to read Console buffer in VBNET?

微笑、不失礼 提交于 2019-12-03 00:39:15
问题 I've seen a C# example using ConsoleRead API function but when I've tried to translate it to VBNET I get a lots of errors, also in other sites like pinvoke the unique example is for C# too, I can't find any good information for VBNET of ConsoleRead API function (if exist a way to read the console buffer without APIS then I get no idea). Also I've tried this console buffer reader Class for VBNET (http://pastebin.com/XYxakDTV) but it throws an unhandled exception with message like this

any good and simple RPC library for inter-process calls? [closed]

落爺英雄遲暮 提交于 2019-12-03 00:35:49
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I need to send a (probably one) simple one-way command from client processes to server process with arguments of builtin C++ types (so

When doing IPC using TCP/IP sockets using the loopback address, do common networking stacks skip framing the message in lower-level PDUs?

…衆ロ難τιáo~ 提交于 2019-12-02 23:25:05
In some environments such as Java, it's natural to use TCP/IP sockets to pass messages between processes on the same host using the 'localhost' address (127.0.0.1 in IPv4, or ::1 in IPv6). (Because Java tends not to expose other IPC mechanisms in its API). Clearly, this has the potential to be a lot slower than IPC via message passing over pipes, or IPC using shared-memory. On the other hand, if the TCP/IP networking stack realised that both ends of the connection were on the loopback interface, it might be able to do a fair bit of optimisation so that the efficiency might not differ much from