-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复:线程 JvEmitEventThread 和 JvHandleMessageThread CPU占用极高 和 报错Can't get…
… WSEndpoint
- Loading branch information
1 parent
0ce14be
commit c83cdcc
Showing
12 changed files
with
174 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.ruiyun.example; | ||
|
||
import com.ruiyun.jvppeteer.core.Browser; | ||
import com.ruiyun.jvppeteer.core.Page; | ||
import com.ruiyun.jvppeteer.core.Puppeteer; | ||
import com.ruiyun.jvppeteer.core.Target; | ||
import java.util.List; | ||
|
||
public class Test2 { | ||
public static void main(String[] args) throws Exception { | ||
try (Browser browser = Puppeteer.launch()) { | ||
//打开一个页面 | ||
Page page = browser.newPage(); | ||
Target target1 = page.target(); | ||
System.out.println("one type=" + target1.type() + ", url=" + target1.url() + ",id=" + target1.getTargetId()); | ||
List<Target> targets = browser.targets(); | ||
//看看targets里面都有什么,包含browser,page,等类型,其中还包含了上面newPage得到page | ||
for (Target target : targets) { | ||
System.out.println("two type=" + target.type() + ", url=" + target.url() + ",id=" + target.getTargetId()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.