Page 1093 - 3-2
P. 1093

public void run() {
                                try {
                                    socket = new Socket("192.168.0.200", 3322);
                                    socket_out = new PrintWriter(socket.getOutputStream(), true);
                                    socket_in = new BufferedReader(new
                                    InputStreamReader(socket.getInputStream()));
                                } catch (IOException e) {
                                    e.printStackTrace();
                                }


                                try {
                                    while (true) {
                                       output.post(new Runnable() {
                                           public void run() {
                                               output.setText(data);
                                           }
                                       });
                                    }
                                } catch (Exception e) {
                                }
                            }
                        };
                        worker.start();
                    }


                @Override
                protected void onStop() {
                    // TODO Auto-generated method stub
                    super.onStop();
                    try {
                        socket.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }


            }
















                                                        - 1093 -
   1088   1089   1090   1091   1092   1093   1094   1095   1096   1097   1098