mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-06-17 23:00:24 +08:00
updated mgmt
This commit is contained in:
@@ -80,7 +80,7 @@ public class LogicFace {
|
||||
channel.connect(new InetSocketAddress(ip, Integer.parseInt(port)));
|
||||
this.linkService=new LinkService();
|
||||
UdpTransport udpTransport=new UdpTransport();
|
||||
udpTransport.init(channel);
|
||||
udpTransport.init(channel,new InetSocketAddress(ip, Integer.parseInt(port)));
|
||||
this.linkService.init(9000); // 设置MTU为 9000 字节
|
||||
this.linkService.logicFace=this;
|
||||
this.linkService.transport=udpTransport;
|
||||
|
||||
@@ -39,8 +39,19 @@ public class BytesBuffer {
|
||||
len++;
|
||||
}
|
||||
|
||||
public void put(byte[] bytes){
|
||||
//todo:
|
||||
/**
|
||||
* put进一个byte[]
|
||||
* @param bs
|
||||
*/
|
||||
public void put(byte[] bs){
|
||||
while((len+bs.length)>MaxNum){
|
||||
MaxNum*=2;
|
||||
byte[] newBytes = new byte[MaxNum];
|
||||
System.arraycopy(bytes, 0, newBytes, 0, len);
|
||||
bytes = newBytes;
|
||||
}
|
||||
System.arraycopy(bs,0,this.bytes,len,bs.length);
|
||||
len+=bytes.length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user