public class Socket extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Socket.cmsghdr
Structure used for storage of ancillary data object information.
|
static interface |
Socket.linger
Structure used to manipulate the SO_LINGER option.
|
static interface |
Socket.msghdr
Structure describing messages sent by `sendmsg' and received by `recvmsg'.
|
static interface |
Socket.sockaddr
Structure describing a generic socket address.
|
static interface |
Socket.sockaddr_storage
Structure large enough to hold any socket address (with the historical exception of AF_UNIX).
|
static interface |
Socket.sockaddrPointer
A struct sockaddr**.
|
static interface |
Socket.ucred
User visible structure for SCM_CREDENTIALS message
|
| Constructor and Description |
|---|
Socket() |
| Modifier and Type | Method and Description |
|---|---|
static int |
accept(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addr_len)
Await a connection on socket FD.
|
static int |
accept4(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addr_len,
int flags)
Similar to 'accept' but takes an additional parameter to specify flags.
|
static int |
AF_APPLETALK() |
static int |
AF_ASH() |
static int |
AF_ATMPVC() |
static int |
AF_ATMSVC() |
static int |
AF_AX25() |
static int |
AF_BLUETOOTH() |
static int |
AF_BRIDGE() |
static int |
AF_DECnet() |
static int |
AF_ECONET() |
static int |
AF_FILE() |
static int |
AF_INET() |
static int |
AF_INET6() |
static int |
AF_IPX() |
static int |
AF_IRDA() |
static int |
AF_KEY() |
static int |
AF_LINK() |
static int |
AF_LOCAL() |
static int |
AF_MAX() |
static int |
AF_NETBEUI() |
static int |
AF_NETLINK() |
static int |
AF_NETROM() |
static int |
AF_PACKET() |
static int |
AF_PPPOX() |
static int |
AF_ROSE() |
static int |
AF_ROUTE() |
static int |
AF_SECURITY() |
static int |
AF_SNA() |
static int |
AF_UNIX() |
static int |
AF_UNSPEC() |
static int |
AF_WANPIPE() |
static int |
AF_X25() |
static int |
bind(int fd,
Socket.sockaddr addr,
int len)
Give the socket FD the local address ADDR (which is LEN bytes long).
|
static int |
connect(int fd,
Socket.sockaddr addr,
int len)
Open a connection on socket FD to peer at ADDR (which LEN bytes long).
|
static int |
FIOGETOWN() |
static int |
FIOSETOWN() |
static int |
getpeername(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer len)
Put the address of the peer connected to socket FD into *ADDR (which is *LEN bytes long), and
its actual length into *LEN.
|
static int |
getsockname(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer len)
Put the local address of FD into *ADDR and its length in *LEN.
|
static int |
getsockopt(int fd,
int level,
int optname,
org.graalvm.word.PointerBase optval,
org.graalvm.nativeimage.c.type.CIntPointer optlen)
Put the current value for socket FD's option OPTNAME at protocol level LEVEL into OPTVAL
(which is *OPTLEN bytes long), and set *OPTLEN to the value's actual length.
|
static int |
isfdtype(int fd,
int fdtype)
FDTYPE is S_IFSOCK or another S_IF* macro defined in
|
static int |
listen(int fd,
int n)
Prepare to accept connections on socket FD.
|
static int |
MSG_CONFIRM()
Confirm path validity.
|
static int |
MSG_CTRUNC()
Control data lost before delivery.
|
static int |
MSG_DONTROUTE()
Don't use local routing.
|
static int |
MSG_DONTWAIT()
Nonblocking IO.
|
static int |
MSG_EOR()
End of record.
|
static int |
MSG_ERRQUEUE()
Fetch message from error queue.
|
static int |
MSG_FIN() |
static int |
MSG_MORE()
Sender will send more.
|
static int |
MSG_NOSIGNAL()
Do not generate SIGPIPE.
|
static int |
MSG_OOB()
Process out-of-band data.
|
static int |
MSG_PEEK()
Peek at incoming messages.
|
static int |
MSG_PROXY()
Supply or ask second address.
|
static int |
MSG_RST() |
static int |
MSG_SYN() |
static int |
MSG_TRUNC() |
static int |
MSG_TRYHARD()
DECnet uses a different name.
|
static int |
MSG_WAITALL()
Wait for a full request.
|
static int |
PF_APPLETALK()
Appletalk DDP.
|
static int |
PF_ASH()
Ash.
|
static int |
PF_ATMPVC()
ATM PVCs.
|
static int |
PF_ATMSVC()
ATM SVCs.
|
static int |
PF_AX25()
Amateur Radio AX.25.
|
static int |
PF_BLUETOOTH()
Bluetooth sockets.
|
static int |
PF_BRIDGE()
Multiprotocol bridge.
|
static int |
PF_DECnet()
Reserved for DECnet project.
|
static int |
PF_ECONET()
Acorn Econet.
|
static int |
PF_FILE()
Another non-standard name for PF_LOCAL.
|
static int |
PF_INET()
IP protocol family.
|
static int |
PF_INET6()
IP version 6.
|
static int |
PF_IPX()
Novell Internet Protocol.
|
static int |
PF_IRDA()
IRDA sockets.
|
static int |
PF_KEY()
PF_KEY key management API.
|
static int |
PF_LOCAL()
Local to host (pipes and file-domain).
|
static int |
PF_MAX()
For now..
|
static int |
PF_NETBEUI()
Reserved for 802.2LLC project.
|
static int |
PF_NETLINK() |
static int |
PF_NETROM()
Amateur radio NetROM.
|
static int |
PF_PACKET()
Packet family.
|
static int |
PF_PPPOX()
PPPoX sockets.
|
static int |
PF_ROSE()
Amateur Radio X.25 PLP.
|
static int |
PF_ROUTE()
Alias to emulate 4.4BSD.
|
static int |
PF_SECURITY()
Security callback pseudo AF.
|
static int |
PF_SNA()
Linux SNA Project
|
static int |
PF_UNIX()
POSIX name for PF_LOCAL.
|
static int |
PF_UNSPEC()
Unspecified.
|
static int |
PF_WANPIPE()
Wanpipe API sockets.
|
static int |
PF_X25()
Reserved for X.25 project.
|
static org.graalvm.word.SignedWord |
recv(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags)
Read N bytes into BUF from socket FD.
|
static org.graalvm.word.SignedWord |
recvfrom(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addr_len)
Read N bytes into BUF through socket FD.
|
static org.graalvm.word.SignedWord |
recvmsg(int fd,
Socket.msghdr message,
int flags)
Receive a message as described by MESSAGE from socket FD.
|
static int |
SCM_CREDENTIALS()
Credentials passing.
|
static int |
SCM_RIGHTS()
Transfer file descriptors.
|
static int |
SCM_TIMESTAMP() |
static org.graalvm.word.SignedWord |
send(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags)
Send N bytes of BUF to socket FD.
|
static org.graalvm.word.SignedWord |
sendmsg(int fd,
Socket.msghdr message,
int flags)
Send a message described MESSAGE on socket FD.
|
static org.graalvm.word.SignedWord |
sendto(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags,
Socket.sockaddr addr,
int addr_len)
Send N bytes of BUF on socket FD to peer at address ADDR (which is ADDR_LEN bytes long).
|
static int |
setsockopt(int fd,
int level,
int optname,
org.graalvm.word.PointerBase optval,
int optlen)
Set socket FD's option OPTNAME at protocol level LEVEL to *OPTVAL (which is OPTLEN bytes
long).
|
static int |
SHUT_RD()
No more receptions.
|
static int |
SHUT_RDWR()
No more receptions or transmissions.
|
static int |
SHUT_WR()
No more transmissions.
|
static int |
shutdown(int fd,
int how)
Shut down all or part of the connection open on socket FD.
|
static int |
SIOCATMARK() |
static long |
SIOCGIFBRDADDR() |
static long |
SIOCGIFCONF() |
static long |
SIOCGIFFLAGS() |
static int |
SIOCGIFHWADDR() |
static int |
SIOCGIFINDEX() |
static long |
SIOCGIFNETMASK() |
static int |
SIOCGPGRP() |
static int |
SIOCGSTAMP()
Get stamp (timeval)
|
static int |
SIOCSPGRP() |
static int |
SO_ATTACH_FILTER() |
static int |
SO_BINDTODEVICE() |
static int |
SO_BROADCAST() |
static int |
SO_BSDCOMPAT() |
static int |
SO_DETACH_FILTER() |
static int |
SO_DONTROUTE() |
static int |
SO_ERROR() |
static int |
SO_KEEPALIVE() |
static int |
SO_LINGER() |
static int |
SO_NO_CHECK() |
static int |
SO_OOBINLINE() |
static int |
SO_PASSCRED() |
static int |
SO_PASSSEC() |
static int |
SO_PEERCRED() |
static int |
SO_PEERNAME() |
static int |
SO_PEERSEC() |
static int |
SO_PRIORITY() |
static int |
SO_RCVBUF() |
static int |
SO_RCVBUFFORCE() |
static int |
SO_RCVLOWAT() |
static int |
SO_RCVTIMEO() |
static int |
SO_REUSEADDR() |
static int |
SO_SECURITY_AUTHENTICATION() |
static int |
SO_SECURITY_ENCRYPTION_NETWORK() |
static int |
SO_SECURITY_ENCRYPTION_TRANSPORT() |
static int |
SO_SNDBUF() |
static int |
SO_SNDBUFFORCE() |
static int |
SO_SNDLOWAT() |
static int |
SO_SNDTIMEO() |
static int |
SO_TIMESTAMP() |
static int |
SO_TYPE() |
static int |
SOCK_DGRAM()
Connectionless, unreliable datagrams of fixed maximum length.
|
static int |
SOCK_PACKET()
Linux specific way of getting packets at the dev level.
|
static int |
SOCK_RAW()
Raw protocol interface.
|
static int |
SOCK_RDM()
Reliably-delivered messages.
|
static int |
SOCK_SEQPACKET()
Sequenced, reliable, connection-based, datagrams of fixed maximum length.
|
static int |
SOCK_STREAM()
Sequenced, reliable, connection-based byte streams.
|
static int |
sockatmark(int fd)
Determine whether socket is at a out-of-band mark.
|
static int |
socket(int domain,
int type,
int protocol)
Create a new socket of type TYPE in domain DOMAIN, using protocol PROTOCOL.
|
static int |
socketpair(int domain,
int type,
int protocol,
org.graalvm.nativeimage.c.type.CIntPointer fds)
Create two new sockets, of type TYPE in domain DOMAIN and using protocol PROTOCOL, which are
connected to each other, and put file descriptors for them in FDS[0] and FDS[1].
|
static int |
SOL_SOCKET()
For setsockopt(2)
|
public static int SOCK_STREAM()
public static int SOCK_DGRAM()
public static int SOCK_RAW()
public static int SOCK_RDM()
public static int SOCK_SEQPACKET()
public static int SOCK_PACKET()
public static int PF_UNSPEC()
public static int PF_LOCAL()
public static int PF_UNIX()
public static int PF_FILE()
public static int PF_INET()
public static int PF_AX25()
public static int PF_IPX()
public static int PF_APPLETALK()
public static int PF_NETROM()
public static int PF_BRIDGE()
public static int PF_ATMPVC()
public static int PF_X25()
public static int PF_INET6()
public static int PF_ROSE()
public static int PF_DECnet()
public static int PF_NETBEUI()
public static int PF_SECURITY()
public static int PF_KEY()
public static int PF_NETLINK()
public static int PF_ROUTE()
public static int PF_PACKET()
public static int PF_ASH()
public static int PF_ECONET()
public static int PF_ATMSVC()
public static int PF_SNA()
public static int PF_IRDA()
public static int PF_PPPOX()
public static int PF_WANPIPE()
public static int PF_BLUETOOTH()
public static int PF_MAX()
public static int AF_UNSPEC()
public static int AF_LINK()
public static int AF_LOCAL()
public static int AF_UNIX()
public static int AF_FILE()
public static int AF_INET()
public static int AF_AX25()
public static int AF_IPX()
public static int AF_APPLETALK()
public static int AF_NETROM()
public static int AF_BRIDGE()
public static int AF_ATMPVC()
public static int AF_X25()
public static int AF_INET6()
public static int AF_ROSE()
public static int AF_DECnet()
public static int AF_NETBEUI()
public static int AF_SECURITY()
public static int AF_KEY()
public static int AF_NETLINK()
public static int AF_ROUTE()
public static int AF_PACKET()
public static int AF_ASH()
public static int AF_ECONET()
public static int AF_ATMSVC()
public static int AF_SNA()
public static int AF_IRDA()
public static int AF_PPPOX()
public static int AF_WANPIPE()
public static int AF_BLUETOOTH()
public static int AF_MAX()
public static int MSG_OOB()
public static int MSG_PEEK()
public static int MSG_DONTROUTE()
public static int MSG_TRYHARD()
public static int MSG_CTRUNC()
public static int MSG_PROXY()
public static int MSG_TRUNC()
public static int MSG_DONTWAIT()
public static int MSG_EOR()
public static int MSG_WAITALL()
public static int MSG_FIN()
public static int MSG_SYN()
public static int MSG_CONFIRM()
public static int MSG_RST()
public static int MSG_ERRQUEUE()
public static int MSG_NOSIGNAL()
public static int MSG_MORE()
public static int SCM_RIGHTS()
public static int SCM_CREDENTIALS()
public static int FIOSETOWN()
public static int SIOCSPGRP()
public static int FIOGETOWN()
public static int SIOCGPGRP()
public static int SIOCATMARK()
public static int SIOCGSTAMP()
public static long SIOCGIFCONF()
public static long SIOCGIFFLAGS()
public static long SIOCGIFBRDADDR()
public static int SIOCGIFHWADDR()
public static long SIOCGIFNETMASK()
public static int SIOCGIFINDEX()
public static int SOL_SOCKET()
public static int SO_REUSEADDR()
public static int SO_TYPE()
public static int SO_ERROR()
public static int SO_DONTROUTE()
public static int SO_BROADCAST()
public static int SO_SNDBUF()
public static int SO_RCVBUF()
public static int SO_SNDBUFFORCE()
public static int SO_RCVBUFFORCE()
public static int SO_KEEPALIVE()
public static int SO_OOBINLINE()
public static int SO_NO_CHECK()
public static int SO_PRIORITY()
public static int SO_LINGER()
public static int SO_BSDCOMPAT()
public static int SO_PASSCRED()
public static int SO_PEERCRED()
public static int SO_RCVLOWAT()
public static int SO_SNDLOWAT()
public static int SO_RCVTIMEO()
public static int SO_SNDTIMEO()
public static int SO_SECURITY_AUTHENTICATION()
public static int SO_SECURITY_ENCRYPTION_TRANSPORT()
public static int SO_SECURITY_ENCRYPTION_NETWORK()
public static int SO_BINDTODEVICE()
public static int SO_ATTACH_FILTER()
public static int SO_DETACH_FILTER()
public static int SO_PEERNAME()
public static int SO_TIMESTAMP()
public static int SCM_TIMESTAMP()
public static int SO_PEERSEC()
public static int SO_PASSSEC()
public static int SHUT_RD()
public static int SHUT_WR()
public static int SHUT_RDWR()
public static int socket(int domain,
int type,
int protocol)
public static int socketpair(int domain,
int type,
int protocol,
org.graalvm.nativeimage.c.type.CIntPointer fds)
public static int bind(int fd,
Socket.sockaddr addr,
int len)
public static int getsockname(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer len)
public static int connect(int fd,
Socket.sockaddr addr,
int len)
public static int getpeername(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer len)
public static org.graalvm.word.SignedWord send(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags)
public static org.graalvm.word.SignedWord recv(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags)
public static org.graalvm.word.SignedWord sendto(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags,
Socket.sockaddr addr,
int addr_len)
public static org.graalvm.word.SignedWord recvfrom(int fd,
org.graalvm.word.PointerBase buf,
org.graalvm.word.UnsignedWord n,
int flags,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addr_len)
public static org.graalvm.word.SignedWord sendmsg(int fd,
Socket.msghdr message,
int flags)
public static org.graalvm.word.SignedWord recvmsg(int fd,
Socket.msghdr message,
int flags)
public static int getsockopt(int fd,
int level,
int optname,
org.graalvm.word.PointerBase optval,
org.graalvm.nativeimage.c.type.CIntPointer optlen)
public static int setsockopt(int fd,
int level,
int optname,
org.graalvm.word.PointerBase optval,
int optlen)
public static int listen(int fd,
int n)
public static int accept(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addr_len)
public static int accept4(int fd,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addr_len,
int flags)
public static int shutdown(int fd,
int how)
public static int sockatmark(int fd)
public static int isfdtype(int fd,
int fdtype)