I've been reading this web page to try to understand the types of data that have to be passed to a fastcgi connection in go. But I do not understand how the data has to be passed, if it is in string or some other type of data.
For example, this is my code:
conn, err := net.Dial("unix", "/run/php-fpm/php-fpm.sock")
if err != nil {
log.Print(err)
}
But I do not understand how (for example) I can send a FCGI_BEGIN_REQUEST record, and get which the socket returns. I have been looking for information for days on the internet, but I have not found a clear way to do it or being a "client" of the socket. I would appreciate your help, by the way, I'm completely new to this topic, so if I'm misunderstanding something please tell me, thanks in advance. (just to clarify, I don't have more code than that because I don't know how I have to send the data to the socket)