Skip to content

JerryI/CSocketListener

 
 

Repository files navigation

CSockets

CSockets is a FAST socket interface for Wolfram Language, written in C

  • Linux - Stable (UV based)
  • MacOS - Stable (UV based)
  • Windows - Stable (native)

It is more than 15 times faster than the native implementation shipped with the Wolfram Kernel. This is achieved with zero overhead using native Windows/Unix low-level sockets.

Why is it better than other C implementations of tiny TCP servers?

  • It handles error 35, which most implementations treat as a regular error and break the data transfer. In practice, this is a common occurrence (depending on the machine and network) when a payload exceeds the buffer capacity of a network card / pipe. Our server saves failed leftover bytes for later and retries after some time.

Examples

Single page

wolframscript -f Tests/Simple.wls

Dynamic app (involves websockets)

wolframscript -f Tests/Full.wls

Stress test

wolframscript -f Tests/Metaballs.wls

Building (NO NEED)

In the LibraryResurces we placed all prebuild binaries. Skip this section if you want just to run this package

If there are some issues with a shipped binaries, one can try to compile it.

wolframscript -f Scritps/BuildLibrary.wls

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 68.2%
  • Mathematica 30.9%
  • C 0.9%