Example usage for android.net LocalSocket close

List of usage examples for android.net LocalSocket close

Introduction

In this page you can find the example usage for android.net LocalSocket close.

Prototype

@Override
public void close() throws IOException 

Source Link

Document

Closes the socket.

Usage

From source file:Main.java

public static void colseLocalSocket(LocalSocket s) {
    if (s != null) {
        try {/*from   ww  w  . j a  va2  s.co m*/
            s.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

From source file:Main.java

public final static void closeQuietly(LocalSocket s) {
    try {//from ww w .java  2  s  .co m
        if (s != null)
            s.close();
    } catch (Exception e) {
        Log.e("OpenVPN", "closing LocalSocket", e);
    }
}