Course of Raku / Functional, concurrent, reactive, and web programming / Web programming / A simple HTTP server / Listening for connections

Quiz — Listening

Which argument makes IO::Socket::INET wait for incoming connections instead of dialling out to a server?

1:listen
0:host
0:server
0:accept

:listen puts the socket in server mode, waiting on a local address and port. You then call .accept to take each incoming connection. (.accept is a method, not a constructor argument.)

Course navigation

Listening for connections   |   Responding to a request