ReadFromSocket

try {
    BufferedReader rd = new BufferedReader(new InputStreamReader(socket.getInputStream()));

    String str;
    while ((str = rd.readLine()) != null) {
        process(str);
    }
    rd.close();
} catch (IOException e) {
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.