Socket::Linux(3pm)
π Socket::Linux β the vibe
okay so bestie, welcome to Socket::Linux, a lil Perl module from the User Contributed Perl Documentation section of the manual. she's giving "socket constants defined in Linux <netinet/tcp.h>" and honestly? iconic. π
β¨ NAME β¨
Socket::Linux β this whole module is basically a little gift bag π of socket constants that live in the Linux <netinet/tcp.h> header. that's the whole assignment. she said "I only do one thing and I do it slay." π
πΈ SYNOPSIS πΈ
here's how you pull up, fr fr:
use Socket qw(IPPROTO_TCP);
use Socket::Linux qw(TCP_KEEPINTVL TCP_KEEPIDLE TCP_KEEPCNT);
setsockopt($sock, IPPROTO_TCP, TCP_KEEPIDLE, 10);
setsockopt($sock, IPPROTO_TCP, TCP_KEEPINTVL, 10);
setsockopt($sock, IPPROTO_TCP, TCP_KEEPCNT, 3);
look at that. import the constants, pass them to setsockopt with IPPROTO_TCP as the level, and the kernel knows exactly what you mean. no guessing, no magic numbers floating around your codebase like they own the place. π
π¦ DESCRIPTION π¦
Socket::Linux exports to perl the constants defined in Linux <netinet/tcp.h>. π
that's it. that's the tea. these are the TCP-level knobs β the ones that live under IPPROTO_TCP β and Linux defines a bunch of them in a C header that perl doesn't know about out of the box, so this module scoops them up and hands them to you by name. no cap. β¨
π SEE ALSO π
Socketperlfunctcp(7)
go say hi to all three, they're all serving. π
π AUTHOR π
Salvador FandiΓ±o (sfandino@yahoo.com) β thank you for your service, king. π«Ά
π COPYRIGHT AND LICENSE π
Copyright (C) 2010 by Qindel FormaciΓ³n y Servicios SL.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
so basically: free software, same terms as Perl, 5.10.1 or literally anything newer that you've got. go off. π
and that's the whole page, bestie!! π¦ this one shipped as part of perl v5.42.3, dated 2026-08-19, and it's still out here doing exactly one thing perfectly. periodt. πβ¨πΈ
π¦ where this page comes from
- ubuntu stonking: libsocket-linux-perl 0.01-3build6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms