本文整理汇总了Java中org.threadly.litesockets.ThreadedSocketExecuter类的典型用法代码示例。如果您正苦于以下问题:Java ThreadedSocketExecuter类的具体用法?Java ThreadedSocketExecuter怎么用?Java ThreadedSocketExecuter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ThreadedSocketExecuter类属于org.threadly.litesockets包,在下文中一共展示了ThreadedSocketExecuter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FakeHTTPStreamingServer
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
public FakeHTTPStreamingServer(int port, HTTPResponse hr, String sendBack, int kiloToSend, boolean doSSL, boolean chunk) throws IOException {
this.port = port;
this.hr = hr;
this.chunked = chunk;
kToSend = kiloToSend;
if(doSSL) {
doSSLCrap();
}
PS = new PriorityScheduler(5);
SEB = new ThreadedSocketExecuter(PS);
SEB.start();
server = new HTTPServer(SEB, "localhost", port, sslCtx);
server.addHandler(this);
server.start();
this.sendBack.add(ByteBuffer.wrap(sendBack.getBytes()));
}
示例2: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Before
public void start() throws IOException {
port = PortUtils.findTCPPort();
PS = new PriorityScheduler(2);
TSE = new ThreadedSocketExecuter(PS);
TSE.start();
httpServer = TSE.createTCPServer("localhost", port);
httpServer.start();
httpServer.start();
}
示例3: TestHTTPServer
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
public TestHTTPServer(int port, HTTPResponse hr, String sendBack, boolean doSSL, boolean closeOnSend) throws IOException {
if(doSSL) {
doSSLCrap();
}
this.hr = hr;
this.port = port;
PS = new PriorityScheduler(5);
SEB = new ThreadedSocketExecuter(PS);
SEB.start();
server = new HTTPServer(SEB, "localhost", port, sslCtx);
server.addHandler(this);
server.start();
this.sendBack.add(ByteBuffer.wrap(sendBack.getBytes()));
this.closeOnSend = closeOnSend;
}
示例4: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Before
public void start() throws IOException {
PS = new PriorityScheduler(5);
SE = new ThreadedSocketExecuter(PS);
SE.start();
serverFC = new FakeUDPServerClient(SE);
server = SE.createUDPServer("127.0.0.1", port);
server.setClientAcceptor(serverFC);
server.start();
}
示例5: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Before
public void start() throws IOException {
port = PortUtils.findTCPPort();
PS = new PriorityScheduler(5);
SE = new ThreadedSocketExecuter(PS);
SE.start();
clientHandler = new FakeTCPServerClient();
pServer = new ProfileServer(SE, "localhost", port, 10);
}
示例6: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Before
public void start() throws IOException {
port = PortUtils.findTCPPort();
PS = new PriorityScheduler(5);
SE = new ThreadedSocketExecuter(PS);
SE.start();
serverFC = new FakeTCPServerClient();
server = SE.createTCPServer("localhost", port);
server.setClientAcceptor(serverFC);
server.addCloseListener(serverFC);
server.start();
}
示例7: closedServerStartTest
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Test
public void closedServerStartTest() throws Exception {
server.close();
SE.startListening(server);
SocketExecuter SE2 = new ThreadedSocketExecuter();
SE2.start();
TCPServer server2 = SE2.createTCPServer("localhost", port);
SE.startListening(server2);
server2.close();
SE2.stopIfRunning();
}
示例8: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Before
public void start() throws Exception {
PS = new PriorityScheduler(5);
SE = new ThreadedSocketExecuter(PS);
SE.start();
port = PortUtils.findTCPPort();
KS = KeyStore.getInstance(KeyStore.getDefaultType());
File filename = new File(ClassLoader.getSystemClassLoader().getResource("test.pem").getFile());
kmf = SSLUtils.generateKeyStoreFromPEM(filename, filename);
sslCtx = SSLContext.getInstance("SSL");
sslCtx.init(kmf.getKeyManagers(), myTMs, null);
serverFC = new FakeTCPServerClient();
}
示例9: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入依赖的package包/类
@Before
public void start() {
PS = new PriorityScheduler(5);
SEI = new ThreadedSocketExecuter(PS);
SEI.start();
}