- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
关于 Bart 在 NAT router blocking JMS messages 中遇到的问题
我试图找到客户端接收 openJMS 消息的端口号。在网上搜索了很久之后,我只能找到有关服务器端口的信息,而在客户端上找不到任何信息。这是用于 tcp 连接。
如果有人能指出我正确的方向,我将不胜感激。
谢谢!
最佳答案
通常,每个新连接的客户端端口号都会不同。 我找不到 OpenJMS 客户端在与服务器通信时使用特定端口号的证据。 这里有一些解释。
When a client process first contacts a server process, it may use a well-known port number to initiate communication. Well-known port numbers are assigned to particular services throughout the Internet, by IANA, the Internet Assigned Numbers Authority. The well-known port numbers are in the range 0 through 1023.
Well-known ports are used only to establish communication between client and server processes. When this has been done, the server allocates an ephemeral port number for subsequent use. Ephemeral port numbers are unique port numbers which are assigned dynamically when processes start communicating. They are released when communication is complete.
In contrast, servers respond to clients; they do not initiate contact with them. Thus, the client doesn't need to use a reserved port number. In fact, this is really an understatement: a server shouldn't use a well-known or registered port number to send responses back to clients. The reason is that it is possible for a particular device to have both client and server software of the same protocol running on the same machine. If a server received an HTTP request on port 80 of its machine and sent the reply back to port 80 on the client machine, it would be sending the reply to the client machine's HTTP server process (if present) and not the client process that sent the initial request.
To know where to send the reply, the server must know the port number the client is using. This is supplied by the client as the Source Port in the request, and then used by the server as the destination port to send the reply. Client processes don't use well-known or registered ports. Instead, each client process is assigned a temporary port number for its use. This is commonly called an ephemeral port number.
Also, a client can connect to many servers on the same port. When the clients connect, they will use a random port on there end.
Only the server needs to worry about using a free port, and the clients need to know what this port is else they will not be able to connect to your server.
关于client - OpenJMS - 客户端端口号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13921443/
关于 Bart 在 NAT router blocking JMS messages 中遇到的问题 我试图找到客户端接收 openJMS 消息的端口号。在网上搜索了很久之后,我只能找到有关服务器端口的
目前我正在尝试使用 openJMS。我已经让示例正常工作,但在这种情况下,我必须在管理页面中添加/编辑队列和主题。 是否可以在 openJMS 运行时动态添加队列以及如何动态添加队列?我想做的是,在运
我有一个应用程序也需要成为 JMS 服务器(代理)。所以我想在同一个 JVM 中启动 OpenJMS 服务器。我粗略地读到这是可能的,但我在 http://openjms.sourceforge.ne
我是一名优秀的程序员,十分优秀!