Skip to content

0359xiaodong/AndroidSocketClient

 
 

Repository files navigation

AndroidSocketClient

socket client 简易封装

Import

JitPack

Add it in your project's build.gradle at the end of repositories:

repositories {
  // ...
  maven { url "https://jitpack.io" }
}

Step 2. Add the dependency in the form

dependencies {
  compile 'com.github.vilyever:AndroidSocketClient:1.0.1'
}

Usage

VDSocketClient socketClient = new VDSocketClient();
socketClient.registerDelegate(new VDSocketClient.VDSocketClientDelegate() {
    @Override
    public void didConnectFromSocketClient(VDSocketClient client) {

    }

    @Override
    public void didDisconnectFromSocketClient(VDSocketClient client) {

    }

    @Override
    public void didReceiveResponseFromSocketClient(VDSocketClient client, String response) {

    }
});
socketClient.connect("192.168.1.1", 80);

License

Apache License Version 2.0

About

socket client 简易封装

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%