All Projects → xnko → libio

xnko / libio

Licence: MIT license
libio is a cross platform high performance io library written in C. It provides ability to write event driven servers and applications with continuous code without callback hell

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
assembly
5116 projects

Projects that are alternatives of or similar to libio

hunt
A refined core library for D programming language. The module has concurrency / collections / event / io / logging / text / serialization and more.
Stars: ✭ 86 (+437.5%)
Mutual labels:  io, event-driven
kafka-penguin
An easy-to-use, lightweight KafkaJS library for message re-processing.
Stars: ✭ 74 (+362.5%)
Mutual labels:  event-driven
tardis
Event sourcing toolkit
Stars: ✭ 35 (+118.75%)
Mutual labels:  event-driven
libuvpp
minimal change of libuv for p2p networking
Stars: ✭ 22 (+37.5%)
Mutual labels:  event-driven
GDAL.jl
Thin Julia wrapper for GDAL - Geospatial Data Abstraction Library
Stars: ✭ 78 (+387.5%)
Mutual labels:  io
core.horse64.org
THIS IS A MIRROR, CHECK https://codeberg.org/Horse64/core.horse64.org
Stars: ✭ 3 (-81.25%)
Mutual labels:  event-driven
Dermayon
Dermayon is Library for supporting build large application,distributed application, scalable, microservices, cqrs, event sourcing, including generic ef repository pattern with unit of work, generic mongo repository pattern with unit of work, kafka, etc
Stars: ✭ 66 (+312.5%)
Mutual labels:  event-driven
xQube
Boilerplate for realtime 3D rendering and server-side physics in HTML5 and NodeJS
Stars: ✭ 1 (-93.75%)
Mutual labels:  io
netpoll
Package netpoll implements a network poller based on epoll/kqueue.
Stars: ✭ 38 (+137.5%)
Mutual labels:  event-driven
kstreams-des-demo
Kafka Streams demo project containing Derivative Events, the Processor Api and Wall-clock examples
Stars: ✭ 24 (+50%)
Mutual labels:  event-driven
dotnet-core-microservices-kafka
Asp.Net Core microservices that communicate asynchronous through Kafka message broker.
Stars: ✭ 42 (+162.5%)
Mutual labels:  event-driven
football-events
Event-Driven microservices with Kafka Streams
Stars: ✭ 57 (+256.25%)
Mutual labels:  event-driven
ency
Enhanced concurrency primitives for Javascript.
Stars: ✭ 32 (+100%)
Mutual labels:  event-driven
EventEmitter
Simple EventEmitter with multiple listeners
Stars: ✭ 19 (+18.75%)
Mutual labels:  event-driven
salt-sproxy
Salt plugin to automate the management and configuration of (network) devices at scale, without running (Proxy) Minions.
Stars: ✭ 105 (+556.25%)
Mutual labels:  event-driven
libcssl
Columbo Simple Serial Library is an easy to use, event driven serial port communication library for Linux.
Stars: ✭ 38 (+137.5%)
Mutual labels:  event-driven
limitio
Golang io.Reader and io.Writer but with limits
Stars: ✭ 72 (+350%)
Mutual labels:  io
NetCDF.jl
NetCDF support for the julia programming language
Stars: ✭ 102 (+537.5%)
Mutual labels:  io
pytokio
[READ ONLY] Refer to gitlab repo for updated version - Total Knowledge of I/O Reference Implementation. Please see wiki for contribution guidelines.
Stars: ✭ 20 (+25%)
Mutual labels:  io
x
Commerce Search & Discovery frontend web components
Stars: ✭ 54 (+237.5%)
Mutual labels:  event-driven

libio

libio is a cross platform high performance io library written in C. It provides ability to write event driven servers and applications with continuous code without callback hell.

Alpha version

Aim of the project

  • Simplify network programming in C
  • Same API for differnet platforms
  • Hide complexity and provide simple and intuitive API
  • Make high performance a default option

CLI

# build
> make

# build debug
> make build=Debug

# install
> make install

# uninstall
> make uninstall

Samples

> make
> bin/file-server samples/todomvc/
# open browser and navigate to http://localhost:8080

API Reference

// All 'int' calls return 0 on success and errno on failure

typedef struct io_loop_t io_loop_t;
typedef void (*io_loop_fn)(io_loop_t* loop, void* arg);

int io_loop_start(io_loop_t** loop);
int io_loop_stop(io_loop_t* loop);
int io_loop_ref(io_loop_t* loop);
int io_loop_unref(io_loop_t* loop);
int io_loop_post(io_loop_t* loop, io_loop_fn entry, void* arg);
int io_loop_exec(io_loop_t* loop, io_loop_fn entry, void* arg);
int io_loop_sleep(uint64_t milliseconds);
int io_loop_idle(io_loop_t* loop, uint64_t milliseconds);


typedef struct io_event_t io_event_t;

int io_event_create(io_event_t** event);
int io_event_delete(io_event_t* event);
int io_event_notify(io_event_t* event);
int io_event_wait(io_event_t* event);


typedef struct io_stream_t io_stream_t;

int io_stream_create(io_stream_t** stream); // Creates a memory stream
int io_stream_close(io_stream_t* stream);
int io_stream_info(io_stream_t* stream, io_stream_info_t** info);
size_t io_stream_read(io_stream_t* stream, char* buffer, size_t length, int exact);
size_t io_stream_unread(io_stream_t* stream, const char* buffer, size_t length);
size_t io_stream_write(io_stream_t* stream, const char* buffer, size_t length);
int io_stream_pipe(io_stream_t* from, io_stream_t* to, size_t chunk_size, size_t* transferred);


typedef struct io_tcp_listener_t io_tcp_listener_t;

int io_tcp_listen(io_tcp_listener_t** listener, const char* ip, int port, int backlog);
int io_tcp_shutdown(io_tcp_listener_t* listener);
int io_tcp_accept(io_stream_t** stream, io_tcp_listener_t* listener);
int io_tcp_connect(io_stream_t** stream, const char* ip, int port, uint64_t timeout);


int io_file_create(const char* path);
int io_file_delete(const char* path);
int io_file_open(io_stream_t** stream, const char* path, io_file_options_t options);

// main entry
int io_run(io_loop_fn entry, void* arg);

Platforms

Tested on

  • Win64 (32 bit build)
  • Ubuntu64 (64 bit build)

ToDos

  • Test on all platforms with different architectures

Contacts

Email:[email protected]

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].