Skip to content

Commit

Permalink
1.set input charset gbk
Browse files Browse the repository at this point in the history
  • Loading branch information
finald committed Jun 15, 2017
1 parent a304dda commit 5603d6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
public interface IClient {
void rxData(String data);

void onSuccessLink();
void onConnected();

void onClosed();
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void run() {
try {
mSocket = new Socket(mIp, mPort);
if (mClient != null)
mClient.onSuccessLink();
mClient.onConnected();
new Thread(new HandlerThread()).start();
} catch (IOException e) {
e.printStackTrace();
Expand Down Expand Up @@ -100,6 +100,8 @@ public void run() {
try {
mSocket.close();
mSocket = null;
if (mClient != null)
mClient.onClosed();
} catch (Exception e) {
mSocket = null;
}
Expand All @@ -116,6 +118,8 @@ public void run() {
try {
mSocket.close();
mSocket = null;
if (mClient != null)
mClient.onClosed();
} catch (Exception e1) {
mSocket = null;
}
Expand Down

0 comments on commit 5603d6e

Please sign in to comment.