Hello, and welcome to issue #34!
I haven’t been able to write much lately, but I’m still around. I’ve continued learning and exploring different technologies. In the last few months, I’ve spent some time doing DevOps work in AWS, helping write some Python Azure functions and even some Apex development. As you can tell, all over the place. But most of all, surviving the rainy season in Central America.
As part of my work, I had to design a client’s network. And because I love doing networking stuff, and I wanted to refresh my knowledge of subnetting. I ended up creating a subnetting Calculator. You can find it here:
Read More...
Building a network application requires a good amount of effort, not only because of the complexities of the application you are building but also by the nature of network architecture. We have to define how are we going to handle the connections, the abstractions we’ll use to differentiate between network code and our application code, etcetera. Here is where SwiftNIO comes in, it provides an efficient non-blocking event-driven model, that is easy to use and extend. If we follow SwiftNIO’s model, we can take a lot of the boilerplate set up away and focus on building the logic of our applications. In this post, I’ll show you how to use SwiftNIO and understand its workflow by creating a server that receives text from clients and returns a modified version of the text.
Read More...
There are many fields in Computer Science, and tech in general, where you’ll want a lab with multiple VMs, containers, or even physical devices running various services. When learning networks, it’s useful to have a local lab. Another example is when doing Reverse Engineering, we sometimes want to work on an ARM processor instead of our desktop x86 processor, so we create a VM.
You get the idea. At some point in your career, you’ll find yourself surrounded by many hosts running services in different ports. Not having a system to reference your host can become a source of confusion. For example, if you stop for the weekend, the following Monday you have to go through your history to figure out if you were using port 2222 or port 2223 to ssh to the VM you were working on last week. In this short post, I’ll show you some techniques I use to keep my lab organised.
Read More...
Apple provides many useful network frameworks. Network.framework (you can check my previous article on Network.framework if you want to see an example) is the latest. But sometimes we need to go deeper, and the abstractions might get in the way. In this post, we are going to see how to use BSD sockets directly in Swift.
Using BSD sockets means interfacing with C from Swift. Let’s first have a look at some concepts and tips that will help us with using sockets.
Read More...
Apple’s network APIs are many, the older APIs are well documented, and you’ll find lots of examples. Not so much about the new Network framework. One factor might be that the name is not that search-friendly. In this post, I’ll explain how to use the NWFramework by creating a basic TCP server-client application.
The server will work as an echo, any message received will be sent back to the client. The client will allow us to send messages to the server and display the server response.
Read More...