org.jgroups.tests.bla2 Maven / Gradle / Ivy
package org.jgroups.tests;
import org.jgroups.util.Util;
import java.net.ServerSocket;
import java.net.Socket;
/**
* @author Bela Ban
* @since x.y
*/
public class bla2 {
protected ServerSocket srv_sock;
protected int count=1;
protected void start() throws Exception {
srv_sock=new ServerSocket(7900);
for(;;) {
Socket client_sock=null;
try {
client_sock=srv_sock.accept();
client_sock.getOutputStream().write(("hello " + count++ + "\n").getBytes());
}
finally {
Util.close(client_sock);
}
}
}
public static void main(String[] args) throws Exception {
new bla2().start();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy