Package test

Source Code of test.StringLineTcpServer

package test;

import com.firefly.net.support.StringLineDecoder;
import com.firefly.net.support.StringLineEncoder;
import com.firefly.net.tcp.TcpServer;

public class StringLineTcpServer {

    public static void main(String[] args) {
      System.setProperty("bind_host", "localhost");
      System.setProperty("bind_port", "9900");
     
      String host = System.getProperty("bind_host");
      int port = Integer.parseInt(System.getProperty("bind_port"));
        new TcpServer(new StringLineDecoder(),
                new StringLineEncoder(), new StringLineHandler()).start(host, port);
    }
}
TOP

Related Classes of test.StringLineTcpServer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.