@@ -0,0 +1,985 @@
+import java.io.IOException;%0Aimport java.net.Socket;%0A%0Apublic class rcvthread implements Runnable %7B%0A  private logger logger;%0A  private final int sizeBuf = 50;%0A  private int flag;%0A  private Socket socket;%0A  private String rcvData = %22Error%22;%0A  private byte%5B%5D rcvBuf = new byte%5BsizeBuf%5D;%0A  private int rcvBufSize;%0A  %0A  public rcvthread(logger logger, Socket socket)%7B    %0A    this.logger = logger;    %0A    flag = 1;    %0A    this.socket = socket;%0A  %7D%0A  %0A  public void setFlag(int setflag) %7B%0A    flag = setflag;%0A  %7D%0A  %0A  public void run() %7B        %0A    while(flag == 1)%7B            %0A      try%7B                %0A        rcvBufSize = socket.getInputStream().read(rcvBuf);%0A        rcvData = new String(rcvBuf, 0, rcvBufSize, %22UTF-8%22);%0A        %0A        if (rcvData.compareTo(%22%5Bclose%5D%22)==0)%7B%0A          flag = 0;%0A        %7D%0A        %0A        logger.log(%22Recive Data : %22 + rcvData);%0A        %7D catch (IOException e)%7B%0A          e.printStackTrace();%0A        %7D%0A      %7D%0A      logger.log(%22Exit loop%22);%0A   %7D%0A%7D%0A

Create rcvthread.java