端口号和协议号有什么区别? [英] What is the difference between a port number and a protocol number?

查看:73
本文介绍了端口号和协议号有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

端口号和协议号有什么区别?

What is the difference between a port number and a protocol number?

推荐答案

您可以将端口视为电话分机,计算机的 IP 地址就像电话号码.您可以拨打号码(IP 地址)与计算机通话,然后拨打分机(端口)与特定应用程序通话.应用程序需要侦听端口才能进行通信.

You can think of a port as a phone extension, with the computer's IP address being like its phone number. You can call the number (IP address) to talk to the computer, then dial the extension (port) to talk to a specific application. An application needs to be listening on a port in order to communicate.

协议只是对话两端的两个应用程序同意使用的语言.如果您的应用程序向我的应用程序发送字节流,我的应用程序需要知道如何解释这些字节.

A protocol is just the language that the two applications on either end of a conversation agree to speak in. If your application is sending streams of bytes to my application, my application needs to know how to interpret those bytes.

这篇关于端口号和协议号有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆