net.fs.rudp.UDPInputStream Java Examples
The following examples show how to use
net.fs.rudp.UDPInputStream.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Pipe.java From NSS with Apache License 2.0 | 5 votes |
public void pipe(UDPInputStream tis,OutputStream os,int maxSpeed,ConnectionUDP conn) throws Exception{ int len=0; byte[] buf=new byte[1000]; boolean sended=false; boolean sendedb=false; int n=0; boolean msged=false; while((len=tis.read(buf, 0, buf.length))>0){ readedLength+=len; if(!sendedb){ pv=buf; pvl=len; sendedb=true; } if(dstPort>0){ if(ClientUI.ui!=null){ if(!msged){ msged=true; //String msg="隧道链接成功 "+dstPort+" 端口 !"; //ClientUI.ui.setMessage(msg); //MLog.println(msg); } } } os.write(buf, 0, len); if(!sended){ sended=true; } } }
Example #2
Source File: Pipe.java From finalspeed-91yun with GNU General Public License v2.0 | 5 votes |
public void pipe(UDPInputStream tis,OutputStream os,int maxSpeed,ConnectionUDP conn) throws Exception{ int len=0; byte[] buf=new byte[1000]; boolean sended=false; boolean sendedb=false; int n=0; boolean msged=false; while((len=tis.read(buf, 0, buf.length))>0){ readedLength+=len; if(!sendedb){ pv=buf; pvl=len; sendedb=true; } if(dstPort>0){ if(ClientUI.ui!=null){ if(!msged){ msged=true; String msg="端口"+dstPort+"连接成功"; ClientUI.ui.setMessage(msg); MLog.println(msg); } } } os.write(buf, 0, len); if(!sended){ sended=true; } } }
Example #3
Source File: Pipe.java From finalspeed with GNU General Public License v2.0 | 5 votes |
public void pipe(UDPInputStream tis, OutputStream os, int maxSpeed, ConnectionUDP conn) throws Exception { int len; byte[] buf = new byte[1000]; boolean sended = false; boolean sendedb = false; int n = 0; boolean msged = false; while ((len = tis.read(buf, 0, buf.length)) > 0) { readedLength += len; if (!sendedb) { pv = buf; pvl = len; sendedb = true; } if (dstPort > 0) { if (ClientUI.ui != null) { if (!msged) { msged = true; String msg = "端口" + dstPort + "连接成功"; ClientUI.ui.setMessage(msg); MLog.println(msg); } } } os.write(buf, 0, len); if (!sended) { sended = true; } } }