类 DomainSocket
java.lang.Object
java.net.Socket
cn.taketoday.buildpack.platform.socket.AbstractSocket
cn.taketoday.buildpack.platform.socket.DomainSocket
- 所有已实现的接口:
Closeable,AutoCloseable
- 直接已知子类:
BsdDomainSocket,LinuxDomainSocket
A
Socket implementation for Linux of BSD domain sockets.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Harry Yang
-
嵌套类概要
嵌套类修饰符和类型类说明private classInputStreamreturned from theDomainSocket.private classOutputStreamreturned from theDomainSocket. -
字段概要
字段修饰符和类型字段说明protected static final byteprivate final FileDescriptorprivate final InputStreamprivate final OutputStreamprotected static final intprivate static final intprivate static final intprotected static final int -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclose()private intclose(int fd) protected abstract voidstatic DomainSocketReturn a newDomainSocketfor the given path.private static booleanprivate FileDescriptorprivate intread(int fd, ByteBuffer buffer, int count) private intread(ByteBuffer buffer) private intsocket(int domain, int type, int protocol) private intwrite(int fd, ByteBuffer buffer, int count) voidwrite(ByteBuffer buffer) 从类继承的方法 cn.taketoday.buildpack.platform.socket.AbstractSocket
connect, connect, getInetAddress, getLocalAddress, getLocalSocketAddress, getRemoteSocketAddress, isBound, isConnected, shutdownInput, shutdownOutput从类继承的方法 java.net.Socket
bind, getChannel, getKeepAlive, getLocalPort, getOOBInline, getOption, getPort, getReceiveBufferSize, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isClosed, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, supportedOptions, toString
-
字段详细资料
-
SHUT_RD
private static final int SHUT_RD- 另请参阅:
-
SHUT_WR
private static final int SHUT_WR- 另请参阅:
-
PF_LOCAL
protected static final int PF_LOCAL- 另请参阅:
-
AF_LOCAL
protected static final byte AF_LOCAL- 另请参阅:
-
SOCK_STREAM
protected static final int SOCK_STREAM- 另请参阅:
-
fileDescriptor
-
inputStream
-
outputStream
-
-
构造器详细资料
-
DomainSocket
DomainSocket(String path) throws IOException - 抛出:
IOException
-
-
方法详细资料
-
open
-
read
- 抛出:
IOException
-
write
- 抛出:
IOException
-
getInputStream
- 覆盖:
getInputStream在类中Socket
-
getOutputStream
- 覆盖:
getOutputStream在类中Socket
-
close
- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 覆盖:
close在类中Socket- 抛出:
IOException
-
connect
-
socket
private int socket(int domain, int type, int protocol) throws com.sun.jna.LastErrorException - 抛出:
com.sun.jna.LastErrorException
-
read
- 抛出:
com.sun.jna.LastErrorException
-
write
- 抛出:
com.sun.jna.LastErrorException
-
close
private int close(int fd) throws com.sun.jna.LastErrorException - 抛出:
com.sun.jna.LastErrorException
-
get
Return a newDomainSocketfor the given path.- 参数:
path- the path to the domain socket- 返回:
- a
DomainSocketinstance - 抛出:
IOException- if the socket cannot be opened
-
isBsdPlatform
private static boolean isBsdPlatform()
-