本文整理汇总了Java中org.threadly.litesockets.ThreadedSocketExecuter.start方法的典型用法代码示例。如果您正苦于以下问题:Java ThreadedSocketExecuter.start方法的具体用法?Java ThreadedSocketExecuter.start怎么用?Java ThreadedSocketExecuter.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.threadly.litesockets.ThreadedSocketExecuter
的用法示例。
在下文中一共展示了ThreadedSocketExecuter.start方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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();
}
示例8: start
import org.threadly.litesockets.ThreadedSocketExecuter; //导入方法依赖的package包/类
@Before
public void start() {
PS = new PriorityScheduler(5);
SEI = new ThreadedSocketExecuter(PS);
SEI.start();
}