Tag:send data

  • Wechat applet realizes real-time speech recognition through websocket


    Before the study of Baidu‘s real-time speech recognition, and applied to the wechat app, write an article to share. Let’s take a look at the results Preconditions Apply for Baidu real time speech recognitionBaidu AI access guide Create an applet Set recording parameters of applet Enter in index. JS const recorderManager = wx.getRecorderManager() const recorderConfig […]

  • Why TCP shakes hands three times instead of two


    According to my understanding, why TCP shakes hands three times instead of two.Step by step. 1. TCP is reliable TCP is a reliable transmission. Handshake refers to TCP establishing link. How can we establish link reliably? 2. The simplest way is to establish a reliable transmission channel A——–>BA wants to send data to B. if […]

  • Implementation of rabbitmq + websocket message push based on hyperf


    introduce Based on hyperf + websocket + rabbitmq to achieve a simple large screen message push. thinking Using websocket protocol to make client and server keep long state link,Save the linked client ID. The message published by the subscriber is broadcast to the saved client ID. Websocket service composer require hyperf/websocket-server Configuration file [config / […]

  • Herf = # results in no data being sent to the background when Ajax requests


    Today, I’m doing the right-click menu. When I click rename for Ajax request, I don’t send data to the background, but jump to the home page directly. I couldn’t understand it. Later, I found a problem on the front page: Copy codeThe code is as follows: <span style=”font- size:24px; “>< Li > < a (?) […]

  • Problems encountered in koa2 post


    Recently, I just set up an internal system of the company. Originally, I wanted to use express. Later, I thought about it and tried something new. So I decided to use koa2, but!!! It’s all pits (anyway, I used koa for the first time). Post is a pit (however, it’s still quite simple for koa2 […]

  • Serial communication learning


    //Prerequisite needs //You need a serialport tool, which can be found in the toolbar of vs //Source code plus serial port tool address: //Link: https://pan.baidu.com/s/1YbfvdXEmfsJX87D-Jxljyg Extraction code: d32x   //Record the serial port number opened by the user, which can be changed to generic mode string serialPortName; //General computer is no serial number, so use […]

  • How does angular simulate HTTP request delay in unit test


    With the in-depth study of angular application, how to simulate HTTP request delay in unit testing is on the agenda. Before there was no HTTP request delay, we used it in the unit testof()To send data manually.of()Methods undoubtedly bring great convenience in unit testing, but due to thesynchronizationSo it can’t simulate the impact of HTTP […]

  • Topic xxx not present in metadata after 60000 MS


    1、 Background Today, I tried to use Kafka’s producer API to write and send messages. As a result, I encountered the following problems,Topic xxx not present in metadata after 60000 ms, found for a long time and found that it was caused by incomplete introduction of jar package. In case of forgetting in the future, […]

  • Socket completes simple communication


    Introduction of socket Socket, also known as “socket”, will send data through UDP / TCP protocol to realize simple communication between two machines. Note: if you want to use socket to realize simple communication between two machines, please make sure that the two machines are connected to the same local area network. Of course, socket […]

  • Middleware five times faster than redis. Why is it so fast?


    Today I’m going to introduce you to keydb, which is a branch of redis fork. As we all know, redis is a kV memory storage system with single thread, while keydb transforms redis into multi thread with 100% compatibility with redis API.   Thread model Keydb divides the original main thread of redis into main […]

  • Using spool to update the code of multiple servers at the same time


    In the architecture of a small website, there is a load balance in the front and several web servers in the back. Updating the code has become a problem. It is unrealistic to transfer one by one FTP, and it is easy to miss, resulting in the code inconsistency of the two web servers A […]

  • Source code analysis of spool


    swPort_onRead_check_eofEOF automatic subcontracting As we said before,swPort_onRead_rawIt’s the simplest wayworkerThe method of sending packets by a process,swooleThe packet received from the client will be sent to the server immediatelyworkerProcess, the user splices the data package If enabledEOFAutomatic subcontracting, thenswooleWill detectEOFSymbol, after splicing the data, send theworkersend data swProtocol_recv_check_eofFor testingEOFSymbols, if no data is detected, are […]