📄 yuyinclient.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package voice;import java.io.IOException;import java.net.Socket;import java.util.logging.Level;import java.util.logging.Logger;/** * * @author Administrator */public class yuyinclient extends Thread{ public yuyinclient(Socket s,String ip) { this.ip = ip; this.cli = s; } public int port=6002; public int maxThreadNum=5; private Socket cli = null; Capture cap = null; String ip = ""; public void run() { try { cli=new Socket(ip,6002); System.out.println("Server Connect!"); cap=new Capture(cli); Playback player=new Playback(cli); cap.start(); player.start(); } catch (Exception ex) { ex.printStackTrace(); } } public void stopclient(){ try { cli.close(); cap.stop(); } catch (IOException ex) { Logger.getLogger(yuyinclient.class.getName()).log(Level.SEVERE, null, ex); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -