public class BSDV6NativeSocket extends NativeDatagramSocket
AF_INET, AF_INET6, IP_MTU_DISCOVER, IPPROTO_ICMP, IPPROTO_ICMPV6, IPPROTO_IP, IPPROTO_IPV6, IPPROTO_UDP, IPV6_DONTFRAG, PF_INET, PF_INET6, SOCK_DGRAM, SOCK_RAW
Constructor and Description |
---|
BSDV6NativeSocket(int family,
int type,
int protocol,
int listenPort) |
Modifier and Type | Method and Description |
---|---|
void |
allowFragmentation(boolean frag) |
int |
bind(int socket,
bsd_sockaddr_in6 address,
int address_len) |
void |
close() |
int |
close(int socket) |
int |
getSock() |
int |
receive(NativeDatagramPacket p) |
int |
recvfrom(int socket,
Buffer buffer,
int buflen,
int flags,
bsd_sockaddr_in6 in_addr,
int[] in_addr_len) |
int |
send(NativeDatagramPacket p) |
int |
sendto(int socket,
Buffer buffer,
int buflen,
int flags,
bsd_sockaddr_in6 dest_addr,
int dest_addr_len) |
int |
setsockopt(int socket,
int level,
int option_name,
com.sun.jna.Pointer value,
int option_len) |
void |
setTrafficClass(int tc) |
int |
socket(int family,
int type,
int protocol) |
allowFragmentation, create, strerror
public int bind(int socket, bsd_sockaddr_in6 address, int address_len) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int socket(int family, int type, int protocol) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int setsockopt(int socket, int level, int option_name, com.sun.jna.Pointer value, int option_len)
setsockopt
in class NativeDatagramSocket
public int sendto(int socket, Buffer buffer, int buflen, int flags, bsd_sockaddr_in6 dest_addr, int dest_addr_len) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int recvfrom(int socket, Buffer buffer, int buflen, int flags, bsd_sockaddr_in6 in_addr, int[] in_addr_len) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int close(int socket) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public void setTrafficClass(int tc) throws com.sun.jna.LastErrorException
setTrafficClass
in class NativeDatagramSocket
com.sun.jna.LastErrorException
public void allowFragmentation(boolean frag) throws IOException
allowFragmentation
in class NativeDatagramSocket
IOException
public int receive(NativeDatagramPacket p)
receive
in class NativeDatagramSocket
public int send(NativeDatagramPacket p)
send
in class NativeDatagramSocket
public void close()
close
in interface AutoCloseable
close
in class NativeDatagramSocket
public int getSock()
getSock
in class NativeDatagramSocket
Copyright © 2021. All rights reserved.