Package EOorg.EOeolang.EOsys.Win32
Interface Winsock
-
- All Superinterfaces:
com.sun.jna.AltCallingConvention
,com.sun.jna.Library
,com.sun.jna.win32.StdCall
,com.sun.jna.win32.StdCallLibrary
public interface Winsock extends com.sun.jna.win32.StdCallLibrary
Interface definitions forWS2_32.dll
.- Since:
- 0.40
-
-
Field Summary
Fields Modifier and Type Field Description static int
AF_INET
The Internet Protocol version 4 (IPv4) address family.static Winsock
INSTANCE
Instance.static int
INVALID_SOCKET
Invalid socket descriptor.static int
IPPROTO_TCP
The Transmission Control Protocol (TCP).static int
SOCK_STREAM
A socket type that provides sequenced, reliable, two-way, connection-based byte streams with an OOB data transmission mechanism.static int
SOCKET_ERROR
Status returned on errors with socket.static short
WINSOCK_VERSION_2_2
Winsock version.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
closesocket(int socket)
Closes a socket.int
socket(int domain, int type, int protocol)
Creates a socket.int
WSACleanup()
Stops usage of Winsock 2 by DLL.int
WSAStartup(short version, WSAStartupFuncCall.WSAData data)
Initializes winsock usage by DLL process.
-
-
-
Field Detail
-
INSTANCE
static final Winsock INSTANCE
Instance.
-
WINSOCK_VERSION_2_2
static final short WINSOCK_VERSION_2_2
Winsock version.- See Also:
- Constant Field Values
-
AF_INET
static final int AF_INET
The Internet Protocol version 4 (IPv4) address family.- See Also:
- Constant Field Values
-
SOCK_STREAM
static final int SOCK_STREAM
A socket type that provides sequenced, reliable, two-way, connection-based byte streams with an OOB data transmission mechanism. This socket type uses the TCP for the Internet address family (AF_INET or AF_INET6).- See Also:
- Constant Field Values
-
IPPROTO_TCP
static final int IPPROTO_TCP
The Transmission Control Protocol (TCP). This is a possible value when the af parameter is AF_INET or AF_INET6 and the type parameter is SOCK_STREAM.- See Also:
- Constant Field Values
-
INVALID_SOCKET
static final int INVALID_SOCKET
Invalid socket descriptor.- See Also:
- Constant Field Values
-
SOCKET_ERROR
static final int SOCKET_ERROR
Status returned on errors with socket.- See Also:
- Constant Field Values
-
-
Method Detail
-
WSAStartup
int WSAStartup(short version, WSAStartupFuncCall.WSAData data)
Initializes winsock usage by DLL process.- Parameters:
version
- Highest Windows socket specification version.data
- Data with info about socket structure- Returns:
- Zero on success, error code on error.
-
WSACleanup
int WSACleanup()
Stops usage of Winsock 2 by DLL.- Returns:
- Zero on success, SOCKET_ERROR on error.
-
socket
int socket(int domain, int type, int protocol)
Creates a socket.- Parameters:
domain
- Socket domaintype
- Socket typeprotocol
- Socket protocol- Returns:
- Socket descriptor
-
closesocket
int closesocket(int socket)
Closes a socket.- Parameters:
socket
- Socket descriptor- Returns:
- Zero on success, otherwise, a value of SOCKET_ERROR is returned.
-
-