marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.02k stars 796 forks source link

Chapter 13, TCP explanation #516

Closed alexpi closed 4 years ago

alexpi commented 4 years ago

The text reads:

For example, when we want to send an email using the SMTP protocol, the machine through which we send it is expected to be listening on port 25.

I have no idea about TCP, but shouldn't the email receiving machine be listening on port 25, instead of the machine sending it?

marijnh commented 4 years ago

Email is sent through an SMTP server that takes care of delivering it to the proper destination server. An email client will connect to such a server (on port 25, traditionally), which is what this sentence is talking about.