1 /*************************************************************************
2 * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
4 * Plugin for PHP unit Testing.
7 *************************************************************************/
11 package net.sourceforge.phpeclipse.phpunit.reporthandling;
13 import java.net.ServerSocket;
14 import java.net.Socket;
16 import net.sourceforge.phpeclipse.phpunit.PHPUnitView;
19 public class ConnectionListener extends Thread {
21 private ServerSocket sSocket = null;
22 private Socket serviceSocket = null;
23 private PHPUnitView view;
26 public void start(PHPUnitView view) {
36 //reportArea.append("listening at port 12345");
38 sSocket = new ServerSocket(12345);
40 // accept connection from test reporter.
41 serviceSocket = sSocket.accept();
43 (new ReportListener(serviceSocket, this.view)).start();
47 } catch (Exception e) {
55 public static void main(String[] args) {
57 (new ConnectionListener()).start(new PHPUnitView());