当前位置: 首页>>代码示例>>Java>>正文


Java ThreadedSocketExecuter.start方法代码示例

本文整理汇总了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()));
}
 
开发者ID:threadly,项目名称:litesockets-http,代码行数:17,代码来源:FakeHTTPStreamingServer.java

示例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();
}
 
开发者ID:threadly,项目名称:litesockets-http,代码行数:11,代码来源:WebSocketClientTest.java

示例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;
}
 
开发者ID:threadly,项目名称:litesockets-http,代码行数:16,代码来源:TestHTTPServer.java

示例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();
}
 
开发者ID:threadly,项目名称:litesockets,代码行数:11,代码来源:UDPTest.java

示例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);
}
 
开发者ID:threadly,项目名称:litesockets,代码行数:10,代码来源:ProfileServerTest.java

示例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();
}
 
开发者ID:threadly,项目名称:litesockets,代码行数:13,代码来源:TCPTests.java

示例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();
}
 
开发者ID:threadly,项目名称:litesockets,代码行数:16,代码来源:SSLTests.java

示例8: start

import org.threadly.litesockets.ThreadedSocketExecuter; //导入方法依赖的package包/类
@Before
public void start() {
  PS = new PriorityScheduler(5);
  SEI = new ThreadedSocketExecuter(PS);
  SEI.start();
}
 
开发者ID:threadly,项目名称:litesockets-http,代码行数:7,代码来源:HTTPStreamClientTest.java


注:本文中的org.threadly.litesockets.ThreadedSocketExecuter.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。