Skip to content

imandra-ai/socket.io-client-ocaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

socket.io-client-ocaml

Engine.io and Socket.io clients for OCaml.

Install

With opam:

opam pin add socketio-client https://github.com/AestheticIntegration/socket.io-client-ocaml.git

Usage

Documentation is published at https://aestheticintegration.github.io/socket.io-client-ocaml/doc.

Also see examples/engine.io/client.ml and examples/socket.io/client.ml for usage examples.

Development

With opam2:

opam switch create ./
eval $(opam env)
opam install . --deps-only --with-test
make build
make test

Running the examples

Requires node and npm.

make examples

make run-example-engineio-server
make run-example-engineio-client

make run-example-socketio-server
make run-example-socketio-client

Documentation

To generate the documenation (requires topkg-care from opam):

opam install topkg-care
make doc

To generate and publish documentation:

topkg distrib
topkg publish doc

TODO

  • Engine.io: Sending/receiving binary messages is largely un-tested.
  • Socket.io: Auto-reconnection (a simple back-off strategy for the initial connection is currently implemented in the Engine.io client.)
  • Socket.io: Binary support