home *** CD-ROM | disk | FTP | other *** search
- import java.io.DataInputStream;
- import java.io.IOException;
- import java.io.PrintStream;
- import java.net.Socket;
- import powersoft.powerj.util.Debug;
-
- class Form_Server$Connection extends Thread {
- // $FF: synthetic field
- final Form_Server this$Form_Server;
- DataInputStream input;
- PrintStream output;
- Socket localClientSocket;
-
- public Form_Server$Connection(Form_Server var1, Socket var2) {
- this.this$Form_Server = var1;
- this.localClientSocket = var2;
-
- try {
- this.input = new DataInputStream(this.localClientSocket.getInputStream());
- this.output = new PrintStream(this.localClientSocket.getOutputStream());
- } catch (IOException var3) {
- Debug.log("IOException while creating socket IO streams!");
- return;
- }
-
- ((Thread)this).start();
- }
-
- public void run() {
- try {
- while(true) {
- String var1 = this.input.readLine();
- if (var1 != null) {
- String var2 = "Message received: \"" + var1 + "\"";
- this.this$Form_Server.lb_1.add(var2);
- var2 = var2 + " Thank you";
- this.output.println(var2);
- continue;
- }
- }
- } catch (IOException var11) {
- Form_Server var10000 = this.this$Form_Server;
- Debug.log("IOException while listening for input!");
- } finally {
- try {
- this.localClientSocket.close();
- this.this$Form_Server.lb_1.add("Connection terminated. Bye!");
- } catch (IOException var10) {
- Form_Server var14 = this.this$Form_Server;
- Debug.log("IOException while closing client socket on server!");
- }
-
- }
-
- }
- }
-