Skip to content

Commit

Permalink
Merge pull request #27 from denismakogon/formatting
Browse files Browse the repository at this point in the history
updating code formatting
  • Loading branch information
denismakogon authored Jun 18, 2024
2 parents 2c47e68 + 7698a2c commit 3870912
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
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);
}

0 comments on commit 3870912

Please sign in to comment.