Class UnixDomainSocket
- java.lang.Object
-
- java.net.Socket
-
- org.mariadb.jdbc.internal.io.socket.UnixDomainSocket
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class UnixDomainSocket extends Socket
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UnixDomainSocket.SockAddr
-
Constructor Summary
Constructors Constructor Description UnixDomainSocket(String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static int
close(int fd)
static int
connect(int sockfd, UnixDomainSocket.SockAddr sockaddr, int addrlen)
void
connect(SocketAddress endpoint)
void
connect(SocketAddress endpoint, int timeout)
InputStream
getInputStream()
OutputStream
getOutputStream()
boolean
isConnected()
static int
recv(int fd, byte[] buffer, int count, int flags)
static int
send(int fd, byte[] buffer, int count, int flags)
void
setKeepAlive(boolean b)
void
setReceiveBufferSize(int size)
void
setSendBufferSize(int size)
void
setSoLinger(boolean b, int i)
void
setSoTimeout(int timeout)
void
setTcpNoDelay(boolean b)
void
shutdownInput()
void
shutdownOutput()
static int
socket(int domain, int type, int protocol)
static String
strerror(int errno)
-
Methods inherited from class java.net.Socket
bind, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOption, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isInputShutdown, isOutputShutdown, sendUrgentData, setOOBInline, setOption, setPerformancePreferences, setReuseAddress, setSocketImplFactory, setTrafficClass, supportedOptions, toString
-
-
-
-
Constructor Detail
-
UnixDomainSocket
public UnixDomainSocket(String path) throws IOException
- Throws:
IOException
-
-
Method Detail
-
socket
public static int socket(int domain, int type, int protocol) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
connect
public static int connect(int sockfd, UnixDomainSocket.SockAddr sockaddr, int addrlen) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
recv
public static int recv(int fd, byte[] buffer, int count, int flags) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
send
public static int send(int fd, byte[] buffer, int count, int flags) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
close
public static int close(int fd) throws com.sun.jna.LastErrorException
- Throws:
com.sun.jna.LastErrorException
-
strerror
public static String strerror(int errno)
-
isConnected
public boolean isConnected()
- Overrides:
isConnected
in classSocket
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
-
connect
public void connect(SocketAddress endpoint) throws IOException
- Overrides:
connect
in classSocket
- Throws:
IOException
-
connect
public void connect(SocketAddress endpoint, int timeout) throws IOException
- Overrides:
connect
in classSocket
- Throws:
IOException
-
getInputStream
public InputStream getInputStream()
- Overrides:
getInputStream
in classSocket
-
getOutputStream
public OutputStream getOutputStream()
- Overrides:
getOutputStream
in classSocket
-
setTcpNoDelay
public void setTcpNoDelay(boolean b)
- Overrides:
setTcpNoDelay
in classSocket
-
setKeepAlive
public void setKeepAlive(boolean b)
- Overrides:
setKeepAlive
in classSocket
-
setReceiveBufferSize
public void setReceiveBufferSize(int size)
- Overrides:
setReceiveBufferSize
in classSocket
-
setSendBufferSize
public void setSendBufferSize(int size)
- Overrides:
setSendBufferSize
in classSocket
-
setSoLinger
public void setSoLinger(boolean b, int i)
- Overrides:
setSoLinger
in classSocket
-
setSoTimeout
public void setSoTimeout(int timeout)
- Overrides:
setSoTimeout
in classSocket
-
shutdownInput
public void shutdownInput()
- Overrides:
shutdownInput
in classSocket
-
shutdownOutput
public void shutdownOutput()
- Overrides:
shutdownOutput
in classSocket
-
-