libfishsoup integration
This commit is contained in:
parent
3257bb449e
commit
a2f2f18910
6 changed files with 262 additions and 6 deletions
|
|
@ -922,3 +922,52 @@ const char* suic_uuid_generate_v4_seeded(uint64_t seed) {
|
|||
suic_random_seed((uint32_t)seed);
|
||||
return suic_uuid_generate_v4();
|
||||
}
|
||||
|
||||
/* ===== FISHSOUP NETWORKING IMPLEMENTATION ===== */
|
||||
|
||||
/* Client functions */
|
||||
fishsoup_client_t* suic_fishsoup_client_create(const char* host, int port) {
|
||||
return fishsoup_client(host, port);
|
||||
}
|
||||
|
||||
void suic_fishsoup_client_on_packet(fishsoup_client_t* client, suic_fishsoup_client_on_packet_fn on_packet) {
|
||||
fishsoup_client_on_packet(client, on_packet);
|
||||
}
|
||||
|
||||
int suic_fishsoup_client_poll(fishsoup_client_t* client) {
|
||||
return fishsoup_client_poll(client);
|
||||
}
|
||||
|
||||
void suic_fishsoup_client_destroy(fishsoup_client_t* client) {
|
||||
fishsoup_client_destroy(client);
|
||||
}
|
||||
|
||||
/* Server functions */
|
||||
fishsoup_server_t* suic_fishsoup_server_create(int port) {
|
||||
return fishsoup_server(port);
|
||||
}
|
||||
|
||||
int suic_fishsoup_server_clients(fishsoup_server_t* server) {
|
||||
return fishsoup_server_clients(server);
|
||||
}
|
||||
|
||||
void suic_fishsoup_server_loop(fishsoup_server_t* server) {
|
||||
fishsoup_server_loop(server);
|
||||
}
|
||||
|
||||
void suic_fishsoup_server_on_client(fishsoup_server_t* server, suic_fishsoup_server_on_client_fn on_client) {
|
||||
fishsoup_server_on_client(server, on_client);
|
||||
}
|
||||
|
||||
void suic_fishsoup_server_destroy(fishsoup_server_t* server) {
|
||||
fishsoup_server_destroy(server);
|
||||
}
|
||||
|
||||
/* Packet functions */
|
||||
int suic_fishsoup_packet_send(int fd, fishsoup_packet_t* packet) {
|
||||
return fishsoup_packet_send(fd, packet);
|
||||
}
|
||||
|
||||
int suic_fishsoup_packet_recv(int fd, fishsoup_packet_t* packet) {
|
||||
return fishsoup_packet_recv(fd, packet);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue