-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iocp] implement iocp and support windows msquic
- Loading branch information
Showing
119 changed files
with
8,553 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
base/src/main/c-generated-graal/io_vproxy_vfd_posix_SocketAddressUnion.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* DO NOT EDIT THIS FILE - it is machine generated */ | ||
/* Header for class io_vproxy_vfd_posix_SocketAddressUnion */ | ||
#ifndef _Included_io_vproxy_vfd_posix_SocketAddressUnion | ||
#define _Included_io_vproxy_vfd_posix_SocketAddressUnion | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
union SocketAddressUnion; | ||
typedef union SocketAddressUnion SocketAddressUnion; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#include <jni.h> | ||
#include <pni.h> | ||
#include "io_vproxy_vfd_posix_SocketAddressIPv4ST.h" | ||
#include "io_vproxy_vfd_posix_SocketAddressIPv6ST.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
PNIEnvExpand(SocketAddressUnion, SocketAddressUnion *) | ||
PNIBufExpand(SocketAddressUnion, SocketAddressUnion, 42) | ||
|
||
union SocketAddressUnion { | ||
SocketAddressIPv4_st v4; | ||
SocketAddressIPv6_st v6; | ||
}; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif // _Included_io_vproxy_vfd_posix_SocketAddressUnion | ||
// metadata.generator-version: pni 22.0.0.17 | ||
// sha256:64053b5106b961599d2072adef45802472adfc519b116532760ed3714408b4b8 |
31 changes: 31 additions & 0 deletions
31
base/src/main/c-generated-graal/io_vproxy_vfd_windows_HANDLE.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* DO NOT EDIT THIS FILE - it is machine generated */ | ||
/* Header for class io_vproxy_vfd_windows_HANDLE */ | ||
#ifndef _Included_io_vproxy_vfd_windows_HANDLE | ||
#define _Included_io_vproxy_vfd_windows_HANDLE | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
struct dummyHANDLE; | ||
typedef struct dummyHANDLE dummyHANDLE; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#include <jni.h> | ||
#include <pni.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
PNIEnvExpand(dummyHANDLE, dummyHANDLE *) | ||
PNIBufExpand(dummyHANDLE, dummyHANDLE, (0 /* !!invalid!! */)) | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif // _Included_io_vproxy_vfd_windows_HANDLE | ||
// metadata.generator-version: pni 22.0.0.17 | ||
// sha256:f024833918c089b23a7f4e0bcaaed7d38fca08bb8e416cc37405ffc9a2dd8c28 |
35 changes: 35 additions & 0 deletions
35
base/src/main/c-generated-graal/io_vproxy_vfd_windows_IOCP.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* DO NOT EDIT THIS FILE - it is machine generated */ | ||
/* Header for class io_vproxy_vfd_windows_IOCP */ | ||
#ifndef _Included_io_vproxy_vfd_windows_IOCP | ||
#define _Included_io_vproxy_vfd_windows_IOCP | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#include <jni.h> | ||
#include <pni.h> | ||
#include "ioapiset.h" | ||
#include "exception.h" | ||
#include "io_vproxy_vfd_windows_HANDLE.h" | ||
#include "io_vproxy_vfd_windows_OverlappedEntry.h" | ||
#include "io_vproxy_vfd_windows_SOCKET.h" | ||
#include "io_vproxy_vfd_windows_Overlapped.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
JNIEXPORT int JNICALL Java_io_vproxy_vfd_windows_IOCP_getQueuedCompletionStatusEx(PNIEnv_int * env, HANDLE handle, OVERLAPPED_ENTRY * completionPortEntries, uint32_t count, int32_t milliseconds, uint8_t alertable); | ||
JNIEXPORT int JNICALL Java_io_vproxy_vfd_windows_IOCP_createIoCompletionPort(PNIEnv_dummyHANDLE * env, HANDLE fileHandle, HANDLE existingCompletionPort, void * completionKey, int32_t numberOfConcurrentThreads); | ||
JNIEXPORT int JNICALL Java_io_vproxy_vfd_windows_IOCP_postQueuedCompletionStatus(PNIEnv_void * env, HANDLE completionPort, int32_t numberOfBytesTransferred, void * completionKey, OVERLAPPED * overlapped); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif // _Included_io_vproxy_vfd_windows_IOCP | ||
// metadata.generator-version: pni 22.0.0.17 | ||
// sha256:2840a12c7829fe33cf2187e211c4d01b08b6bd44857bca9f05b0e9c63b8082f4 |
53 changes: 53 additions & 0 deletions
53
base/src/main/c-generated-graal/io_vproxy_vfd_windows_IOCP.impl.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#include "io_vproxy_vfd_windows_IOCP.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
JNIEXPORT int JNICALL Java_io_vproxy_vfd_windows_IOCP_getQueuedCompletionStatusEx(PNIEnv_int * env, HANDLE handle, OVERLAPPED_ENTRY * completionPortEntries, uint32_t count, int32_t milliseconds, uint8_t alertable) { | ||
ULONG nRemoved = 0; | ||
BOOL ok = GetQueuedCompletionStatusEx( | ||
handle, completionPortEntries, count, | ||
&nRemoved, milliseconds, alertable | ||
); | ||
if (!ok) { | ||
if (GetLastError() == WAIT_TIMEOUT) { | ||
nRemoved = 0; | ||
} else { | ||
return throwIOExceptionBasedOnErrno(env); | ||
} | ||
} | ||
env->return_ = nRemoved; | ||
return 0; | ||
} | ||
|
||
JNIEXPORT int JNICALL Java_io_vproxy_vfd_windows_IOCP_createIoCompletionPort(PNIEnv_dummyHANDLE * env, HANDLE fileHandle, HANDLE existingCompletionPort, void * completionKey, int32_t numberOfConcurrentThreads) { | ||
HANDLE handle = CreateIoCompletionPort( | ||
fileHandle, existingCompletionPort, | ||
(ULONG_PTR)completionKey, numberOfConcurrentThreads | ||
); | ||
if (handle == INVALID_HANDLE_VALUE) { | ||
return throwIOExceptionBasedOnErrno(env); | ||
} | ||
env->return_ = (void*)handle; | ||
return 0; | ||
} | ||
|
||
JNIEXPORT int JNICALL Java_io_vproxy_vfd_windows_IOCP_postQueuedCompletionStatus(PNIEnv_void * env, HANDLE completionPort, int32_t numberOfBytesTransferred, void * completionKey, OVERLAPPED * overlapped) { | ||
BOOL ok = PostQueuedCompletionStatus( | ||
completionPort, | ||
numberOfBytesTransferred, | ||
(ULONG_PTR)completionKey, | ||
overlapped | ||
); | ||
if (!ok) { | ||
return throwIOExceptionBasedOnErrno(env); | ||
} | ||
return 0; | ||
} | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
// metadata.generator-version: pni 22.0.0.17 | ||
// sha256:5730e82ee6793f27cb30fde6f9a909967bd0ff262a9f6e03304b7940c80314ad |
30 changes: 30 additions & 0 deletions
30
base/src/main/c-generated-graal/io_vproxy_vfd_windows_Overlapped.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* DO NOT EDIT THIS FILE - it is machine generated */ | ||
/* Header for class io_vproxy_vfd_windows_Overlapped */ | ||
#ifndef _Included_io_vproxy_vfd_windows_Overlapped | ||
#define _Included_io_vproxy_vfd_windows_Overlapped | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#include <jni.h> | ||
#include <pni.h> | ||
#include "minwinbase.h" | ||
#include "io_vproxy_vfd_windows_HANDLE.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
PNIEnvExpand(OVERLAPPED, OVERLAPPED *) | ||
PNIBufExpand(OVERLAPPED, OVERLAPPED, 32) | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif // _Included_io_vproxy_vfd_windows_Overlapped | ||
// metadata.generator-version: pni 22.0.0.17 | ||
// sha256:64bedb16fd587e5ef172be5e417bf42a5ea1ca3335de6a325a3f967b75eee06b |
Oops, something went wrong.