WeChat applet websocket port configuration

高洛峰
Release: 2017-03-01 10:54:57
Original
4174 people have browsed it

The official description of WeChat applet websocket is like this

WeChat applet websocket port configuration

The URL here needs to use a domain name, such as wss://nblftech.xxx.com
But when we actually develop the websocket server program, we need to specify the port number. Suppose we define the port number 8181, then the URL for normal websocket to establish a connection should be
wss://ip:8181
Found in the mini program wx.connectSocket(OBJECT), if in debugging mode, The port number can be specified in the URL.
In non-debugging mode, the port cannot be specified in the URL. I did not find the default port number specified by the mini program in the official documentation (if anyone knows, please let me know)
Later, I checked the third-party information http://blog.csdn.net/supermig/article/details/ 49358171, found that using port 443, you can connect to websocket in non-debugging mode.

PS: Let’s assume that the default port number of the mini program websocket is 443.

For more articles related to WeChat mini program websocket port configuration, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template