# LocalSocketAddress

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/net/LocalSocketAddress#pubctors)\|[Methods](https://developer.android.com/reference/android/net/LocalSocketAddress#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/net/LocalSocketAddress#inhmethods)  

# LocalSocketAddress

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/net/LocalSocketAddress "View this page in Kotlin")\|Java

`
public


class
LocalSocketAddress
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.LocalSocketAddress |

<br />

*** ** * ** ***

A UNIX-domain (AF_LOCAL) socket address. For use with android.net.LocalSocket and android.net.LocalServerSocket. On the Android system, these names refer to names in the Linux abstract (non-filesystem) UNIX domain namespace.

## Summary

|                                                                                                                                                                                                        ### Public constructors                                                                                                                                                                                                         ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[LocalSocketAddress](https://developer.android.com/reference/android/net/LocalSocketAddress#LocalSocketAddress(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` name) ` Creates an instance with a given name in the[Namespace.ABSTRACT](https://developer.android.com/reference/android/net/LocalSocketAddress.Namespace#ABSTRACT)namespace                                             |
| ` `[LocalSocketAddress](https://developer.android.com/reference/android/net/LocalSocketAddress#LocalSocketAddress(java.lang.String,%20android.net.LocalSocketAddress.Namespace))`(`[String](https://developer.android.com/reference/java/lang/String)` name, `[LocalSocketAddress.Namespace](https://developer.android.com/reference/android/net/LocalSocketAddress.Namespace)` namespace) ` Creates an instance with a given name. |

|                                                                                                                               ### Public methods                                                                                                                               ||
|---------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String)                                               | ` `[getName](https://developer.android.com/reference/android/net/LocalSocketAddress#getName())`() ` Retrieves the string name of this address             |
| ` `[LocalSocketAddress.Namespace](https://developer.android.com/reference/android/net/LocalSocketAddress.Namespace) | ` `[getNamespace](https://developer.android.com/reference/android/net/LocalSocketAddress#getNamespace())`() ` Returns the namespace used by this address. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### LocalSocketAddress

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public LocalSocketAddress (String name)
```

Creates an instance with a given name in the[Namespace.ABSTRACT](https://developer.android.com/reference/android/net/LocalSocketAddress.Namespace#ABSTRACT)namespace

<br />

|               Parameters               ||
|--------|--------------------------------|
| `name` | `String`: non-null name <br /> |

### LocalSocketAddress

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public LocalSocketAddress (String name, 
                LocalSocketAddress.Namespace namespace)
```

Creates an instance with a given name.

<br />

|                                          Parameters                                          ||
|-------------|---------------------------------------------------------------------------------|
| `name`      | `String`: non-null name <br />                                                  |
| `namespace` | `LocalSocketAddress.Namespace`: namespace the name should be created in. <br /> |

## Public methods

### getName

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String getName ()
```

Retrieves the string name of this address

<br />

|                                        Returns                                         ||
|--------------------------------------------------------------------|--------------------|
| [String](https://developer.android.com/reference/java/lang/String) | string name <br /> |

### getNamespace

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public LocalSocketAddress.Namespace getNamespace ()
```

Returns the namespace used by this address.

<br />

|                                                                    Returns                                                                    ||
|------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [LocalSocketAddress.Namespace](https://developer.android.com/reference/android/net/LocalSocketAddress.Namespace) | non-null a namespace <br /> |