home *** CD-ROM | disk | FTP | other *** search
- import java.io.IOException;
- import java.net.ServerSocket;
- import java.net.Socket;
- import powersoft.powerj.util.Debug;
-
- public class Form_Server$Server extends Thread {
- // $FF: synthetic field
- final Form_Server this$Form_Server;
- ServerSocket listeningSocket;
-
- public Form_Server$Server(Form_Server var1, int var2) {
- this.this$Form_Server = var1;
- if (var2 < 0) {
- var2 = 1777;
- }
-
- try {
- this.listeningSocket = new ServerSocket(var2);
- } catch (IOException var4) {
- Debug.log("IOException while creating ServerSocket");
- System.exit(1);
- }
-
- String var3 = "Server is listening on port " + var2;
- var1.lb_1.add(var3);
- ((Thread)this).start();
- }
-
- public void run() {
- try {
- while(true) {
- Socket var1 = this.listeningSocket.accept();
- this.this$Form_Server.lb_1.add("Client socket successfully created on server.");
- new Form_Server$Connection(this.this$Form_Server, var1);
- String var3 = "Connected to " + var1.getInetAddress().getHostName();
- this.this$Form_Server.lb_1.add(var3);
- }
- } catch (IOException var4) {
- Form_Server var10000 = this.this$Form_Server;
- Debug.log("IOException while listening for connection requests!");
- }
- }
- }
-