sncp优化
This commit is contained in:
@@ -32,7 +32,7 @@ public class SncpClientCodecTest {
|
||||
InetSocketAddress sncpAddress = new InetSocketAddress("127.0.0.1", 3389);
|
||||
InetSocketAddress remoteAddress = new InetSocketAddress("127.0.0.1", 3344);
|
||||
final AsyncIOGroup asyncGroup = new AsyncIOGroup(8192, 16);
|
||||
SncpClient client = new SncpClient("test", asyncGroup, sncpAddress, new ClientAddress(remoteAddress), Utility.cpus(), 16);
|
||||
SncpClient client = new SncpClient("test", asyncGroup, sncpAddress, new ClientAddress(remoteAddress), "TCP", Utility.cpus(), 16);
|
||||
SncpClientConnection conn = client.createClientConnection(1, asyncGroup.newTCPClientConnection());
|
||||
SncpClientCodec codec = new SncpClientCodec(conn);
|
||||
List respResults = new ArrayList();
|
||||
|
||||
@@ -25,9 +25,9 @@ import org.redkale.util.*;
|
||||
*/
|
||||
public class SncpTest {
|
||||
|
||||
private static final String myhost = Utility.localInetAddress().getHostAddress();
|
||||
private static final String myhost = "127.0.0.1";
|
||||
|
||||
private static int port = 0;
|
||||
private static int port = 63877;
|
||||
|
||||
private static int port2 = 4240;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.nio.channels.CompletionHandler;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import org.redkale.annotation.ResourceType;
|
||||
import org.redkale.net.*;
|
||||
import org.redkale.net.sncp.*;
|
||||
import org.redkale.net.sncp.Sncp;
|
||||
import org.redkale.service.*;
|
||||
import org.redkale.util.ResourceFactory;
|
||||
|
||||
@@ -89,7 +89,7 @@ public class SncpTestServiceImpl implements SncpTestIService {
|
||||
System.out.println(method);
|
||||
}
|
||||
System.out.println("-----------------------------------");
|
||||
for (Method method : SncpOldClient.parseMethodActions(service.getClass()).values()) {
|
||||
for (Method method : Sncp.loadMethodActions(service.getClass()).values()) {
|
||||
System.out.println(method);
|
||||
}
|
||||
System.out.println("-----------------------------------");
|
||||
@@ -98,7 +98,7 @@ public class SncpTestServiceImpl implements SncpTestIService {
|
||||
System.out.println(method);
|
||||
}
|
||||
System.out.println("-----------------------------------");
|
||||
for (Method method : SncpOldClient.parseMethodActions(service.getClass()).values()) {
|
||||
for (Method method : Sncp.loadMethodActions(service.getClass()).values()) {
|
||||
System.out.println(method);
|
||||
}
|
||||
System.out.println("-----------------------------------");
|
||||
@@ -107,7 +107,7 @@ public class SncpTestServiceImpl implements SncpTestIService {
|
||||
System.out.println(method);
|
||||
}
|
||||
System.out.println("-----------------------------------");
|
||||
for (Method method : SncpOldClient.parseMethodActions(service.getClass()).values()) {
|
||||
for (Method method : Sncp.loadMethodActions(service.getClass()).values()) {
|
||||
System.out.println(method);
|
||||
}
|
||||
System.out.println("-----------------------------------");
|
||||
|
||||
Reference in New Issue
Block a user