LocalSocket
public
class
LocalSocket
extends Object
implements
Closeable
| java.lang.Object | |
| ↳ | android.net.LocalSocket |
Creates a (non-server) socket in the UNIX-domain namespace. The interface here is not entirely unlike that of java.net.Socket. This class and the streams returned from it may be used from multiple threads.
Summary
Constants | |
|---|---|
int |
SOCKET_DGRAM
Datagram socket type |
int |
SOCKET_SEQPACKET
Sequential packet socket type |
int |
SOCKET_STREAM
Stream socket type |
Public constructors | |
|---|---|
LocalSocket()
Creates a AF_LOCAL/UNIX domain stream socket. |
|
LocalSocket(int sockType)
Creates a AF_LOCAL/UNIX domain socket with the given socket type. |
|
Public methods | |
|---|---|
void
|
bind(LocalSocketAddress bindpoint)
Binds this socket to an endpoint name. |
void
|
close()
Closes the socket. |
void
|
connect(LocalSocketAddress endpoint, int timeout)
|
void
|
connect(LocalSocketAddress endpoint)
Connects this socket to an endpoint. |
FileDescriptor[]
|
getAncillaryFileDescriptors()
Retrieves a set of file descriptors that a peer has sent through an ancillary message. |
FileDescriptor
|
getFileDescriptor()
Returns file descriptor or null if not yet open/already closed |
InputStream
|
getInputStream()
Retrieves the input stream for this instance. |
LocalSocketAddress
|
getLocalSocketAddress()
Retrieves the name that this socket is bound to, if any. |
OutputStream
|
getOutputStream()
Retrieves the output stream for this instance. |
Credentials
|
getPeerCredentials()
Retrieves the credentials of this socket's peer. |
int
|
getReceiveBufferSize()
|
LocalSocketAddress
|
getRemoteSocketAddress()
|
int
|
getSendBufferSize()
|
int
|
getSoTimeout()
|
boo | |