What is SOL_ used for?

Reading Python library and came across this:

socket.getaddrinfo("www.python.org", 80, proto=socket.SOL_TCP)

I understand it's specifying that TCP is to be used but what is the significance of SOL_? After some searching I've found that it's part of the C library, understandable, but can't seem to find any specific explanation of it.

I did read that it had to do with layers, perhaps "SOcket Layer"?

Solutions

This indeed stands for "socket layer" or "socket options layer" in the original BSD socket API, so Python keeps the naming for consistency.

Tags: Python / C / Sockets

Similar questions

System.Net.WebUtility.UrlEncode and System.Web.HttpUtility.UrlEncode methods differences
According to the documentation of the System.Net.WebUtility.UrlEncode(String) method character codes should be encoded with low-case letters, at least in the example it's stated so: "For example, when embedded in a block of text to be transmitted in a URL, the characters < and > are encoded as %3c and %3e." But I get all of them in upper case. F...
ServiceStack complete noob tutorial
I have been completely strugling with servicestack. I followed tons of tutorials that I found on google and none works, not even the simple hellotutorial works. Even servicestack's tutorials generate errors on my VS project and don't work at all. Also, none of the examples deployed on servicestack's github examples work. I am using Windows 8 and I ...
Why can't I use HttpServerUtility.HtmlEncode inside a class?
I am trying to use the following code: I am getting the following error: An object reference is required for the nonstatic field, method, or property. Why can't I use HttpServerUtility.HtmlEncode inside a class?
Can't find HttpServerUtility class in System.Web in C#
I'm trying to call the HttpServerUtuility.URLDecode function in C# using Visual Studio 2005, but it can't be found. I'm using System.Web properly, but the class doesn't seem to be there. Do I need to add some sort of reference to my project?
HttpServerUtility.UrlTokenDecode fails "sometimes" (Invalid length for a Base-64 char array.)
We have an IHttpHandler for stylesheets and add a <link/> tag to the page like this: In the stylesheet.axd handler, we UrlTokenDecode the d query string parameter like this: This works most of the time but every now and then we find one of the following two exceptions in our log: Any ideas what would cause this phenomenon? Remarks:
StructureMap can not find a default instance for HttpServerUtility
I have a class that relies on HttpServerUtilityBase my plan was to get structure map to use HttpServerUtilityWrapper as the default instance. Nothing odd there. However, once I've added the declarations to my registry, structuremap is unable to resolve the instance and I get a 202 error. This is my registry: It all looks fine to me, but clearly I'm...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.