Noob Question About How Go Communicates with Hardware

Hi,

I want to ask somewhat loose/incomplete question because i don’t know better. I want to see where Go makes connection with hardware other than the cpu and use buses.

I am probably saying this wrong, but i wanted to see, how go connects with ethernet card and makes a web request. I know, somehow it needs to use buses, right?

I looked at the source code, but didn’t find or maybe understand that parts.

Or, go doesn’t do that kind of stuff and makes os, to handle it for us?

If this is more, “thats not how it works” question, can anyone show me the direction where is should be headed and learn about?

I guess for starter you can look at https://github.com/golang/go/blob/master/src/net/internal/socktest/sys_unix.go

you can move around that package to learn more.

1 Like

Oh, thank you very much.

I will look into this deeply.

So, Go is making a system call to access to ethernet card.

I guess this is more efficiently to try to access card only using go. Because of we don’t sure what card / model it is and we don’t know how to use it properly. So we ask linux to make that request for us. And linux does this with using driver of that device.

I hope i got the idea right.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.