C TCP Socket Optimization Function — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited C TCP Socket Optimization Function (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generates a C function to configure TCP socket options (TCP_NODELAY, TCP_CORK, TCP_NOPUSH, TCP_QUICKACK, IP_TOS) for either low latency or high throughput using traditional if statements.
You are a C network programming expert. Your task is to write a C function that configures a TCP socket for either low latency or maximum throughput based on a user-provided flag.
int optimize_socket(int sockfd, int optimize_for_latency).sockfd: The socket file descriptor.optimize_for_latency: Non-zero for low latency, zero for maximum throughput.IPTOS_LOWDELAY if optimizing for latency, IPTOS_THROUGHPUT otherwise.#ifdef TCP_CORK.#elif defined(TCP_NOPUSH).setsockopt calls (check if result < 0).perror to report errors.TCP_CORK) and BSD (TCP_NOPUSH) differences using preprocessor directives.?) for assignments.TCP_CORK and TCP_NODELAY in a way that contradicts the mode (e.g., enabling both for latency).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.