So network sockets are like phone calls for computers, and literally, in the 1960s when they were designing the concept for network software, that is the concept that they came up with. And that is that in a sense we make a call, we talk on the call, and hang the phone up. And as computers were going to share data and some computers were going to have data and other computers are going to want data, they thought, oh, the way to do this is not necessarily have a permanent connection to that data, because there's going to be so many computers and so many sources of data, and so many computers that want to consume those data. And of course in 1960, they had no imagination that there will be billions, they just thought there would be 10,000, and they thought that was a lot. But they came up with a protocol that basically said when you don't have continuous, permanent access to data, you actually make a phone call. You know where the data's at, you kind of say, you dial up, you grab the stuff, you get it back, and then you let the connection go. And so it means that with billions of computers each talking to each other, the network isn't so complex. And so there's this connect, talk, disconnect. Connect, talk, disconnect. And it's the way the phone system in our world scales to all the people, and it's the way the Internet scales to all the people that want to use that Internet. So this is made inside of software using an abstraction, or a library, called sockets, and sockets really are computer phone calls. You know where you're going to call, you can start the call, wait for them to answer, once they answer, there is a two-way communication. It's kind of like a file, except that you can simultaneously read from the file and write from the file. Although it's important for the two cooperating pieces of software to know who's going to read first, and who's going to write first, because it's like if when you pick the phone up after it rings, we all know to say, "Hello." And that's kind of a protocol. Who talks first is a protocol. And then the person goes, like, "Who is this?" And then eventually conversations happen pretty naturally. Somebody talks, listens, someone else talks, listens, and that works, but there's complicated protocols. And you can think of this not necessarily as the browser on your laptop or phone as talking to data on the server, it actually is talking to another program. So even when it's just retrieving a file, it's talking to an application on that server, and that application is reading the file and sending it out. And we'll see that eventually, how we have to do that, when we're doing things like uploading pictures. We upload pictures and then we have to actually serve them back out. We can't just say, "Oh, the pictures are there, you can grab them," because sometimes not everyone can see every picture. And so part of the software application decides if you are allowed to see this picture, I will send it. If you're not allowed to see the picture, I will not send it. And so that's where it's a piece of software that you're talking even if you're looking at a picture. Sometimes that software's really simple and you barely notice it, but there is software in the loop, it's not like you just go straight to data. It is really two pieces of computer software talking to each other, and we use the Internet as that intermediary to allow that conversation to happen. So if you read my book about the TCP/IP, you'll learn this in super great detail, but every computer has an IP address. It is a number. There are two kinds of addresses, there's IPv4 and IPv6. IPv4, version 4, is the one that's got four dotted numbers, like 142.16.42.114, but within each of those they have what's called a TCP port number. And because this whole Internet thing is applications talking to applications, we need to have a good way to know which application we're talking to, and that's where TCP port numbers come in. And you can think of this as like a phone extension. So you have a phone number, and then you have extension 1436. And so TCP port numbers are like that. So we can not have a specific address for every application, but an application has an address and a port within that address, or a phone number and an extension within that phone number. And so you can look these things up. Port 25 is used for email server-to-server communication. In the old days, we used this thing called telnet, we'll talk about that, on port 23. And so the client is on the right-hand side, and it might be a computer where you've got a keyboard and it's you, or it might be a server that's got some mail that's being forwarded from somewhere, and they all talk and they connect to an IP address. In this case, 74.208.28.177 is the IP address of this computer, and then port 25 is the extension where one computer sends email to another computer. And each of the arrows in between them is a separate protocol. So if you're talking to an email server, you expect to talk to in email protocol, and if you're talking to a login server, you get a login protocol, that's kind of the simplest one. A web server can be on port 80 if it's unsecure. Preferred, of course is HTTPS, which is on port 443. If you have a mail application like, say, Thunderbird, that's reading Gmail, it talks to ports 109, or 110, or a couple of other ones. There are ways for a mailbox application to talk a protocol to a server-based mailbox to retrieve the new messages, or delete a message, or view a message, or whatever. So there are these ports on servers that have protocols, and then we can build software on our clients that talk to these protocols. The one we're going to be playing with the most in development mode is port 80, and in production mode, port 443 for the HTTP, for web documents, basically, and web application documents. So up next, we're going to take a quick look at the HyperText Transfer Protocol, I also want to call it HyperText Transport Protocol, HTTP, and that is the protocol that we talk to port 80 or port 443. [MUSIC]