Why can webscoket be used without a defined method? What is the principle?
2022-08-06 07:36:47【CSDN Q&A】
I don't understand this part because I read the code written by others.Isn't webscoket only four built-in methods, onopen, onmessage, onerror, and onclose.
Here this $openws.ws is an instance of webscoket.But I saw that there is no chat_receipt method in the code at all, so why can it still be used? The backend has the same method name. Does it mean that webscoket can directly call the method determined by the backend through the instance, so even if it is connected, and then the backend can automatically push to the foreground by doing operations in this method?
Instances are like this.There is no such method at all
author[CSDN Q&A],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Python use pyinstaller how to wrap up music exe, is to run a packaged program play background music?
- DDR refresh problem, write verilog driver ddr by yourself
- Interface is inherited object methods
- How to understand print print position
- Error when installing hexo, showing that it is not an external command
- Seeking to troubleshoot and solve code problems, paid and paid
- How to choose the language c++, go java
- Dear gods, how can I ask for the range of normalized floating point numbers?
- Use MySQL to intercept JSON string, the result is null
- About the relationship between #include header files
guess what you like
During the consolidation, there are questions that have not been resolved for a long time
How to solve the problem of Modal modal box invalidation after full screen?
The definition of pycharm writing python code
198. [Example 5.22] Thorium Douxing c++
Problems defining functions in Python
Question about #machine learning#: the phenomenon encountered in the problem and the background (language-matlab)
A little problem of blog garden beautification
Ng Enda's ML gradient descent part of the code reports an error
Django server running error
In a Spring Boot project, when the application.properties file has the same configuration as nacos, the configuration content on Nacos cannot be obtained through @NacosValue?
- Likou 53: Maximum subarray sum
- The QT sub-thread sends the printing information to the main thread through the loop. Why does the main thread only focus on printing at the end, instead of printing once per loop?
- How to use _printf_p function to output character constants?
- Presence of iot software engineering direction of learning course is recommended
- Independently developed technology Expressed in Chinese characters
- Questions about # linux# : I don't know how to knock the interface things away after, to get something back
- Question about #linux#: I don't know how to knock everything on the interface, how can I get it back?
- About global and local variables
- Mysql installation ask for answers
- Django reports an error ModuleNotFoundError: No module named 'mysqlclient'
- How to bypass file renaming in file upload vulnerability in ctf
- What is the role of sgd_optimizer() in RepVGG code?
- C++ calculates equations, finds ideas and solutions
- stm32f411ADC sampling code
- Can anyone figure out what the problem is
- More than useful fastjson2.0 version?Our company will upgrade fastjson vulnerabilities version, I upgrade to 2.0
- How does trc20 call transferfrom to transfer usdt to my authorized address
- The green hand solves the floating point problem, the software is dev C++
- Raspberry Pi 4b cannot install RPi.GPIO
- About the # c + + # addition, subtraction, multiplication, and division
- How to represent unequally spaced values with equally spaced values in Python?
- I have two ali function of cloud computing application function of the product demand, don't know whether the planned support: 1, choose the Git repository
- My feign interface parameter defines a parent type, why do I report a type conversion error when I convert it to a subclass in the method?The caller passes the subclass
- How to ban LAN instant messaging software such as Netcom and Feiqiu
- php fails to write data to mysql
- What is the problem, I don't understand, I don't know the reason for the error, why the display does not exist
- can not load library qt5quick.dll
- What is wrong with flinkcdc mysql DataStream API?
- The error that occurs when running the code on the textbook
- Running time out, how to solve it?
- Why can't spring use mybaits for database operations to recognize Chinese
- Why web request twice, the first is a null pointer, the null pointer exception
- H3C device port configuration does not take effect
- If the first box is 30px high and the second box is 40px high, how can the top of the third box be aligned with the baseline of the first box,
- The R language permutation test calculates the P value without error prompts or displaying the results
- How does python solve high concurrency
- How to use js to become this data format
- Hard disk and save so??How to deal with?
- On-line project database properties added