Package jnr.enxio.channels
Class WinLibCAdapter
java.lang.Object
jnr.enxio.channels.WinLibCAdapter
- All Implemented Interfaces:
Native.LibC
,jnr.ffi.provider.LoadedLibrary
public final class WinLibCAdapter
extends Object
implements Native.LibC, jnr.ffi.provider.LoadedLibrary
MSVCRT.DLL only supports some LibC functions, but the symbols are different.
This adapter maps the MSVCRT.DLL names to standard LibC names
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface jnr.enxio.channels.Native.LibC
F_GETFL, F_SETFL, O_NONBLOCK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
close
(int fd) int
fcntl
(int fd, int cmd, int data) jnr.ffi.Runtime
int
kevent
(int kq, ByteBuffer changebuf, int nchanges, ByteBuffer eventbuf, int nevents, Native.Timespec timeout) int
kevent
(int kq, jnr.ffi.Pointer changebuf, int nchanges, jnr.ffi.Pointer eventbuf, int nevents, Native.Timespec timeout) int
kqueue()
int
pipe
(int[] fds) int
poll
(ByteBuffer pfds, int nfds, int timeout) int
poll
(jnr.ffi.Pointer pfds, int nfds, int timeout) int
read
(int fd, byte[] data, long size) int
read
(int fd, ByteBuffer data, long size) int
shutdown
(int s, int how) strerror
(int error) int
write
(int fd, byte[] data, long size) int
write
(int fd, ByteBuffer data, long size)
-
Constructor Details
-
WinLibCAdapter
-
-
Method Details
-
close
public int close(int fd) - Specified by:
close
in interfaceNative.LibC
-
read
- Specified by:
read
in interfaceNative.LibC
-
read
public int read(int fd, byte[] data, long size) - Specified by:
read
in interfaceNative.LibC
-
write
- Specified by:
write
in interfaceNative.LibC
-
write
public int write(int fd, byte[] data, long size) - Specified by:
write
in interfaceNative.LibC
-
pipe
public int pipe(int[] fds) - Specified by:
pipe
in interfaceNative.LibC
-
strerror
- Specified by:
strerror
in interfaceNative.LibC
-
getRuntime
public jnr.ffi.Runtime getRuntime()- Specified by:
getRuntime
in interfacejnr.ffi.provider.LoadedLibrary
-
fcntl
public int fcntl(int fd, int cmd, int data) - Specified by:
fcntl
in interfaceNative.LibC
-
poll
- Specified by:
poll
in interfaceNative.LibC
-
poll
public int poll(jnr.ffi.Pointer pfds, int nfds, int timeout) - Specified by:
poll
in interfaceNative.LibC
-
kqueue
public int kqueue()- Specified by:
kqueue
in interfaceNative.LibC
-
kevent
public int kevent(int kq, ByteBuffer changebuf, int nchanges, ByteBuffer eventbuf, int nevents, Native.Timespec timeout) - Specified by:
kevent
in interfaceNative.LibC
-
kevent
public int kevent(int kq, jnr.ffi.Pointer changebuf, int nchanges, jnr.ffi.Pointer eventbuf, int nevents, Native.Timespec timeout) - Specified by:
kevent
in interfaceNative.LibC
-
shutdown
public int shutdown(int s, int how) - Specified by:
shutdown
in interfaceNative.LibC
-