Home  >  Article  >  WeChat Applet  >  WeChat applet websocket port configuration

WeChat applet websocket port configuration

高洛峰
高洛峰Original
2017-03-01 10:54:574094browse

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!

Statement:
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