Skip to content

A non-blocking websocket client using io_uring.

Notifications You must be signed in to change notification settings

FreerGit/ws-uring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websocket client

The client is non-blocking and it's modelled as a state machine using io_uring to handle IO without sys-calls.

Example

A simple example is within examples, to run the example do:

foo@bar:~$ cd test_server
foo@bar:~$ npm i
foo@bar:~$ node server.js

open a new terminal and run (you can skip --release if you want):

foo@bar:~$ cargo run --release --example main

DNS

Using the client never blocks except on DNS lookup, when creating a new client object a dns lookup is made. You can therefore assume ~1ms of blocking on new().

io_uring

This crate uses raw file descriptors and io_uring, it's therefore platform dependant and requires a >= 5.1 kernel. To check wether or not you system supports io_uring you can run:

foo@bar:~$ grep -i uring /boot/config-$(uname -r)

About

A non-blocking websocket client using io_uring.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published