Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating code formatting #27

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
- name: version
id: version
shell: bash
run: echo "version_var=$(date +'%Y.%m.%d+%s')" >> $GITHUB_ENV
run: echo "version_var=$(date +'%Y.%m.%d')" >> $GITHUB_ENV

- name: Set up Homebrew
id: set-up-homebrew
Expand Down
11 changes: 8 additions & 3 deletions include/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
#ifdef __cplusplus
extern "C" {
#endif
int nativeServer(void (*handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */), int port, int bufferSize, int threadCount);
int nativeServer(void (*handler)(char* /* data */, long /* bytesReceived*/,
char* /* host */, int /* port */),
int port, int bufferSize, int threadCount);
void boostServer(void (*handler)(struct udp_request* request),
void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, long /* bytesReceived */, char* /* client */, int /* port */),
void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */),
void (*before_handler)(char* /* data */, char* /* errorCategory */,
int /* errorCode */, long /* bytesReceived */,
char* /* client */, int /* port */),
void (*after_handler)(char* /* data */, long /* bytesReceived*/,
char* /* host */, int /* port */),
int port, int bufferSize, int threadCount);
#ifdef __cplusplus
}
Expand Down
10 changes: 7 additions & 3 deletions include/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

#include "structs.h"

int startNativeServer(void (*handler)(char*, long, char*, int), int port, int bufferSize, int threadCount);
int startNativeServer(void (*handler)(char*, long, char*, int),
int port, int bufferSize, int threadCount);
void startBoostServer(void (*handler)(struct udp_request* request),
void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, long /* bytesReceived */, char* /* client */, int /* port */),
void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */),
void (*before_handler)(char* /* data */, char* /* errorCategory */,
int /* errorCode */, long /* bytesReceived */,
char* /* client */, int /* port */),
void (*after_handler)(char* /* data */, long /* bytesReceived*/,
char* /* host */, int /* port */),
int port, int bufferSize, int threadCount);
#endif /* server_h */
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ before_install:
- sdk install java 22-open
install:
- PROJECT=judy
- version=$(date +'%Y.%m.%d+%s')
- version=$(date +'%Y.%m.%d')
- JAR_NAME="$PROJECT.latest.jar"
- FILE="jars/$JAR_NAME"
- mkdir jars/
Expand Down
6 changes: 4 additions & 2 deletions src/c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ extern "C" int nativeServer(void (*handler)(char*, long, char*, int), int port,
}

extern "C" void boostServer(void (*handler)(struct udp_request* request),
void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */, long /* bytesReceived */, char* /* client */, int /* port */),
void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */, int /* port */),
void (*before_handler)(char* /* data */, char* /* errorCategory */, int /* errorCode */,
long /* bytesReceived */, char* /* client */, int /* port */),
void (*after_handler)(char* /* data */, long /* bytesReceived*/, char* /* host */,
int /* port */),
int port, int bufferSize, int threadCount) {
startBoostServer(handler, before_handler, after_handler, port, bufferSize, threadCount);
}