All developers, sit up!

What we're bringing on Safetica blog today will be highly interesting for all the fellow coders out there. Our developer Benny (Marek Strihavka) has put together a sample code showing you how to write a highly scalable Windows Socket server in C++. If you feel like you could make use of it, feel free to use the code in your own projects.

Here's from Benny:

I am excited to share with you an interesting code that I’ve come up with. Have you ever thought about how to write a scalable Windows Socket server that can handle hundreds, or even thousands of connections at once? You can use this open and free IPC library for inspiration.

In Safetica, we have eventually decided not to use this library in our code since sockets have their downsides (e.g. can be blocked by a firewall) and there are more efficient ways to communicate within one computer. However, the code has made it to the final round of our performance tests.


The library is called "barbeque" (BBQ - Broadcast Burst Queue) and it uses overlapped I/O operations, Sockets 2 APIs, I/O completion ports, threadpool, it's all written in plain C++ (non-object inner code with outer object interface, designed for MS Visual Studio 2010 and higher). We’ve included also some unit tests with the code samples so that you can play around with the library before you decide to adopt it.

See and download the full code here: http://www.codeproject.com/Articles/1105171/Broadcast-Burst-Queue


Low-level coder grown on x86 assembler. System hacker in heart, spending most of his time exploring dead end paths :)


 

Author
Petra Voženílková
HR Manager @Safetica

She devotes herself to the people who make up Safetica and excitedly introduces it to those who might become a part of it one day.

Next articles

Dedicated DLP vs. Integrated DLP: Which makes most sense for your organization?

While researching DLP solutions for your organization, you might’ve come across two different variants: dedicated DLP (also known as enterprise DLP) and integrated DLP. In simple terms, a dedicated DLP is a dedicated data loss prevention system. An integrated DLP is an extension to an already existing program used within the organization. Read more.

The Top 6 Biggest Data Leaks of 2022

Last year, that the average global cost of a single data breach was USD 4.35 million – a 2.6% increase from 2021. Read about the top 6 biggest data leaks of 2022, and find out why data protection is so much needed.

Top 4 reasons why financial institutions should use Safetica

One of the most vulnerable industries in the data protection realm is financial services. In the financial industry, the estimated average cost of a data breach was $5.97 million – the second highest only after the healthcare industry. That's not a small amount!