public class Win32V4NativeSocket 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 |
---|
Win32V4NativeSocket(int family,
int type,
int protocol,
int listenPort) |
Modifier and Type | Method and Description |
---|---|
void |
allowFragmentation(boolean frag) |
int |
bind(int socket,
sockaddr_in address,
int address_len) |
void |
close() |
int |
close(int socket) |
int |
closesocket(int socket) |
int |
getSock() |
int |
receive(NativeDatagramPacket p) |
int |
recvfrom(int socket,
Buffer buffer,
int buflen,
int flags,
sockaddr_in in_addr,
int[] in_addr_len) |
int |
send(NativeDatagramPacket p) |
int |
sendto(int socket,
Buffer buffer,
int buflen,
int flags,
sockaddr_in dest_addr,
int dest_addr_len) |
void |
setTrafficClass(int tc) |
int |
socket(int domain,
int type,
int protocol) |
allowFragmentation, create, setsockopt, strerror
public int bind(int socket, sockaddr_in address, int address_len) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int socket(int domain, int type, int protocol) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int sendto(int socket, Buffer buffer, int buflen, int flags, sockaddr_in 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, sockaddr_in in_addr, int[] in_addr_len) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int closesocket(int socket) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int close(int socket) throws com.sun.jna.LastErrorException
com.sun.jna.LastErrorException
public int getSock()
getSock
in class NativeDatagramSocket
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
Copyright © 2021. All rights reserved.