Async C++ Communication Library for Linux (and Windows) [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a communications library (socket, possibly IPC as well) for usage in C++ on Linux, if possible also on Windows if it's platform independent.
It should be async. I tried the Boost Asio Library, but due to limitations we can't find a solution for, we cannot use the Asio library in our solution.
It should be an implementation where no external binary is needed to be executed separately to act as an independent server.
Does anyone of you know something that might help me with these constraints, as I don't want to implement the communication from scratch.
Edit:
One more limitation I forgot to mention. The communication should allow implementation independent client and server, so the messaging system should deliver and receive single messages/strings to and from dedicated sources (server s sends string str to client c)
Edit 2:
The Boost limitations are that with the current system, Boost Asio compiled with the MPI compiler of either MPICH2 or openmpi, especially when using mpi calls, loses several messages when trying to communicate over asio.

Take a look at ZeroMQ, a.k.a ØMQ.

Lot's of free stuff available, look for anything implementing AMQP (for example, and not limited to: Apache's attempt - ActiveMQ, ZeroMQ as listed above, rabbit mq [which is more complete than zero] and even Red Hat are in the game with Red Hat Messaging).
Lot's of pay for solutions ranging from Tibco to 29 West, Tervela to Solace - this depends on how much you want to fork out...
Other options, I really like include OpenDDS - different to AMQP, but again highly scalable and very good performance. (forgot to say, OpenDDS uses ACE under the covers...)

Related

When writing code for a TCP socket server, what's the best library (C/C++) to use for multiple asynchronous connections? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm writing C/C++ code for a TCP Socket Server that will be running on a Windows machine. I've come across the Winsock library but I'm wondering whether or not it is good enough to handle, say 100-150 simultaneous connections. Any help is appreciated!
Winsock is the socket library on Windows. Any C++ library on Windows for networking internally calls Winsock only.
However, Winsock is a C library.
Scalability. First of all, yes it can scale up to thousands of concurrent connections. Second, for scalability you would require asynchronous sockets. There are many techniques to do this like, Scatter/Gather I/O (look for Winsock functions prefixed with WSA), ioctls to name the common choices.
You may also like to explore boost:asio. It is pure C++, easier syntax.
WinSock IS the TCP stack on Windows, so, yes, it can handle as many connections as you can throw at it.
There are some wrappers around this (such as Alhem), which make writing applications easier, but it still uses WinSock.

Any opensource C/C++ Libraries/Frameworks for RPC over pipes/internal linux sockets? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am looking for a lightweight opensource library/framework preferably written in C/C++ (it doesn't have to support x languages and should be easy to understand and use.) which can be used to make RPC over internal linux sockets or pipes.
In other words I am looking for an RPC possibility which can be run over some of the linux IPC mechanisms.
Thanks
Look at msgpack-rpc. It's easy and very simple RPC implementation.
Not exactly lightwieght, but Dbus is an answer and it's standard on most linux distributions these days.
I guess you don't want any fancy framework and can handle simple library calls. The linux rpc library should then be sufficient: See the manpage, and maybe this tutorial.
SUN ONC RPC library for Linux is a good solution. Also you can use the rpcgen compiler to generate server and client stubs.
All you have to do is to write an .x in the RPCL language an compile it using rpcgen.
Here is an example that I have published in github: https://github.com/issamabd/SDL-PPONG
It uses RPC calls to connect two PingPong players over the network.

Windows Named Pipe Support in Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I'm looking at a project which will require inter-process communication between a legacy Windows application using named pipes, and a new service running on a Linux server. The windows application cannot be changed. Does anyone know if there is a Linux library available that supports Windows named pipes? Or even better, can anyone recommend a library they have used for this purpose?
Windows and Linux named pipes are different animals. If an interop solution exists you are going to be one of a very small population of users.
You might be better off writing a proxy on the Windows side to map between Named Pipe and socket, and connecting this to a socket on the Linux end. This provides you a useful networked interface on the Linux side going forward, and removes what might be a world of Named Pipes interop hurt from the picture.
If I was doing this I would try to produce a simple passthrough proxy in C# (managed code) as a proof of concept. Can always convert to native code (Win32/C++) if throughput does not measure up. There is some sample C# code here that might be a useful reference.
Here is background on the nuances of Windows vs Linux named pipes.
I bet Samba/Winbind contains highly relevant code. Not sure how reusable it is, though.

AMQP C++ implementation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
We are writing C++ code which needs messaging. Is there a free/open-source and stable AMQP server available that has equally stable C++ client library with it. We also need to provide Python interface of our code to users (idea is to do maximum stuff in C++ and expose the API in Python).
What can be best way to achieve this.
For future reference, take a look at Apache Qpid - it has a C++ client library and is very good. The problem for your use-case is that Rabbit implements AMQP 0-8 and the Qpid C++ client talks AMQP 0-10.
Apache QPid seems to be relevant here. There's a C++ broker/client library here.
Note that since you're programming to a protocol (AMQP), your broker/client don't have to be in the same language. e.g. I'm using Scala and C# clients talking to RabbitMQ (an Erlang broker).
AMQP C++ wrapper https://github.com/akalend/amqpcpp on librabbit: https://github.com/alanxz/rabbitmq-c
For RabbitMQ, the following library is more feature rich with good documentation:
https://github.com/CopernicaMarketingSoftware/AMQP-CPP
I know this is a bit late, I'm kind of in the same position as the asker.
I'm looking at IceStorm and Apache QPid per answers above.
Currently I have rabbit MQ but it's not so easy to integrate with C++.
I think if you have control over both client and server code, and you don't need AMQP "the standard" and IceStorm does what you need, and you're cool with GPL license (or ready to buy a license from zeroC) .. IceStorm seems to be the most stable and cross-language solution out there.

Could anyone suggest a good packet sniffer class for c++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Could anyone suggest a good packet sniffer class for c++? Looking for a easy insertable class I can use in my c++ program, nothing complicated.
You will never be able to intercept network traffic just by inserting a class into your project. Packet capture functionality requires kernel mode support, hence you will at the very least need to have your application require or install libpcap/WinPcap, as Will Dean pointed out.
Most modern Unix-like distributions include libpcap out of the box, in which case you could take a look at this very simple example: http://www.tcpdump.org/pcap.htm
If you're using Windows, you're more or less on your own, although WinPcap programming is extremely similar to libpcap programming (unsurprisingly, since it's a libpcap port to Win32.) The SDK can be found here: http://www.winpcap.org/devel.htm
At any rate, no matter the operating system, you will need root / Administrator access to actually perform a capture. Just using the library to replay or analyze precaptured data doesn't require any special privilege, of course.
You'll need to say something about your platform, as this is a platform rather than a language thing.
But assuming you're on something common, look into pcap or winpcap.
Microsoft Network Monitor has a packet capture and analysis API, see the netmon blog for some basic info.