Skip to content
Back to the catalog
Project http-serverNetworkingIntermediateBeta

Servidor HTTP desde el socket

Del byte crudo a una respuesta 200. Parsea peticiones, gestiona conexiones y sirve tráfico concurrente.

Build it in your language

The tester treats your program as a black box: any language works. These are just the most convenient ones for this project.

Guide language

The stage guides read in this language. Only languages this project is fully translated into show up here; the interface language does not change.

What this project is about

Usas frameworks web todos los días, pero debajo de todos ellos hay lo mismo: un socket TCP escuchando y un protocolo de texto que cabe en una hoja. Este reto quita el framework de en medio.

Empiezas abriendo un socket a mano y terminas con un servidor que parsea peticiones reales, sirve ficheros, entiende cabeceras y atiende a varios clientes a la vez sin bloquearse. Lo probarás con curl y con tu navegador.

Roadmap

10 stages across 4 phases. Every stage comes with its guide and its tests: you move on when they pass.

  1. Phase 12 stages

    Hablar TCP

    Abre un socket, acepta una conexión y devuelve un 200 escrito a mano.

    1. 01Respuesta HTTP mínima
    2. 02Lectura de conexión
  2. Phase 23 stages

    Parsear HTTP de verdad

    Línea de petición, cabeceras, cuerpo y respuestas de error bien formadas.

    1. 01Línea de petición
    2. 02Cabeceras
    3. 03Cuerpo y errores
  3. Phase 33 stages

    Servir contenido

    Enrutado por path, ficheros estáticos, Content-Type y manejo de POST.

    1. 01Enrutado
    2. 02Ficheros estáticos seguros
    3. 03POST y JSON
  4. Phase 42 stages

    Aguantar carga

    Concurrencia, keep-alive y timeouts para no caerse con varios clientes.

    1. 01Clientes concurrentes
    2. 02Keep-alive y timeouts

Before you start

Un servidor HTTP/1.1 escrito sobre sockets TCP: acepta conexiones, parsea la línea de petición y las cabeceras, enruta por path, sirve ficheros estáticos con su Content-Type, responde a POST con cuerpo, mantiene conexiones keep-alive y atiende peticiones concurrentes.

  • bittorrent
    Beta

    A BitTorrent client

    Bencode, trackers and the peer-to-peer protocol. Download a real file by talking to real peers.

    Advanced12 stages~20 hNetworking
    bencodep2pprotocolos+1

    Go · Python · Java

  • dns-resolver
    Beta

    A DNS resolver

    Build and parse UDP packets bit by bit. Resolve names by walking the hierarchy from the root servers.

    Intermediate8 stages~9 hNetworking
    udpbinarioprotocolos

    Go · Rust · Python

  • mcp-server
    Beta

    Build an MCP server

    Build a Model Context Protocol server from scratch with JSON-RPC, tools, and resources.

    Intermediate5 stages~12 hNetworking
    mcpjson rpcagentes+1

    TypeScript · Python · Go