In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to understand the principles of Monkey Talk recording contact and playback contact. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
The principle of recording negotiation:
1. Start a tcp service with port RECORD_PORT = 16861
2. Then send a http request (sent to playback port: 16862). Take ip and port as parameters, and add a parameter to indicate the start of recording: record. There are two values: ON and OFF.
3. 16861 port to receive recording in a loop
The negotiation principle of playback:
Read the recorded command file and send instructions to the playback port (16862).
This code does not need to be written by yourself, and the monkey talk source code has been readily implemented.
The code is similar to:
ScriptProcessor processor = new ScriptProcessor (PLAYBACK_HOST, PLAYBACK_PORT, rootDir)
System.out.println (processor)
Processor.setPlaybackListener (LISTENER)
Processor.setGlobalThinktime (3000)
Processor.setGlobalTimeout (1000)
/ / execute script file
/ *
PlaybackResult playbackResult = processor.runScript (SCRIPT)
System.out.print ("PlaybackResult:" + playbackResult)
, /
/ / execute command list
List commands = new ArrayList ()
Scope scope = new Scope ()
PlaybackResult playbackResult = processor.runScript (commands, scope)
System.out.print ("PlaybackResult:" + playbackResult)
On how to understand Monkey Talk recording contact and playback contact principle is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.