org.apache.mina.common.ConnectFuture Java Examples
The following examples show how to use
org.apache.mina.common.ConnectFuture.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CougarProtocolTest.java From cougar with Apache License 2.0 | 4 votes |
public IoSession createClient(NioConfig cfg, IoHandler handler) throws IOException { SocketConnector sc = new SocketConnector(); ConnectFuture cf = sc.connect(new InetSocketAddress("127.0.0.1", 2227), handler, cfg.configureSocketSessionConfig()); cf.join(); return cf.getSession(); }