What kind of pure c++ code without an API could communicate with hardware?

could i create a program that could say switch on and off my keyboard led?

Im going to approach network programming, i have looked at qt, win sockets, boost rah rah rah, and the high level stuff i could learn easily but never realy underdsand enough of whats going on, and the low level stuff like poco and boost networking code is still a bit too hard.

So before i get into all this network stuff i would like to dabble/learn a bit of code that might act like a driver or help me understand how code communicates with hardware without the api or with the minimum possible extra stuff needed, if i can talk to the keyboard then i could then talk to the printer or even the graphics stuff i would be communicating to a certain extent.

then i can learn how more complicated hardware works like my wifi.

or is this totaly the wrong way to understand network programing/web programing?

my goal is to send things to a specific server but also know what im doing and whats going on.
Last edited on
There are two distinct paths there

- If you are a "software" developer (as most of us are), you should rely on the abstractions provided by the operating system and the device drivers. Knowing this "which bits go through the pin 2 of the USB interface" kind of thing is out of scope if you are creating applications for the final user.
The lowest level you could be here are the C system calls.


- You could be the guy who provides these layers of abstractions, such as O.S or drivers. Note that this is not simply a software development task, there is a lot of hardware and electronics knowledge.

As the time goes you may find interesting to know the low level stuff (such as assembly language, kernel development, drivers...), but don't take this as a prerequisite to write software.
so what are you saying? so APIs also use assembly language to use the th tinternet, any advice for a potential network programmer

assembly language is tempting so i can build an os
Last edited on
so IS there a way to learn network programming from beginner-ish
Last edited on
I can't understand what you are saying... I'm not a native English speaker, so I'm not used to some abbreviations and expressions.

Could you explain in other words (if you don't mind) ?
i want to learn network programming basicly.

i wanted to know if i could manipulate anything outside of the console window and text files with c++, this (i believed) would sort of begin a path to using hardware like a wirless connection

you rightly stated thats too low level for software, thats more of a hardware thing, which is fine i will learn assembly language later.

my issue is qt is almost too easy, yet i dont understand why im doing what i am doingin the tutorials, i know the results, i just dont know how what im doing is working, which is painfull.

so i wondered if theres a really simple way to send hello world down your network through a wirless connection with c+= code alone

or if anyone knew of any reading which will set my misdirected brain in the correct direction
The lowest level you can get (I'm not sure if the OS will even let you write to the hardware) would be socket api.
That's right, the sockets API is a nice way to understand what goes behind the scenes.

You can establish network communication with system calls, which means that you are requesting services from the kernel. The only way to go beyond this point is diving into kernel development...

A google search for "C sockets" will return some tutorials on this subject. Most of them are based on linux, but in Windows api (winsocks) most of the calls are identical.
Topic archived. No new replies allowed.