ggwave icon indicating copy to clipboard operation
ggwave copied to clipboard

Possible to perform simultaneous communications

Open Suhas-13 opened this issue 2 years ago • 4 comments

Hi, I was wondering if someone could point me in the right direction. I've been experimenting with ggwave-js and am trying to create a chat-type project that allows back and forth between a group of people, however, issues naturally occur when two devices are transmitting at the same time, is there any way to get around this?

Suhas-13 avatar Sep 10 '21 16:09 Suhas-13

Hi, thanks for the question. It is interesting if someone can think of something smart to tackle this issue. I've written some thoughts on this topic in the following discussion: https://github.com/ggerganov/ggwave/discussions/16

ggerganov avatar Sep 10 '21 17:09 ggerganov

Thanks for the reply, if I wanted to add a new protocol on the JS bindings, how would I go about doing that?

Suhas-13 avatar Sep 11 '21 02:09 Suhas-13

after I make the changes to the ggwave.h file, how do I recompile the js file?

Suhas-13 avatar Sep 11 '21 03:09 Suhas-13

You need to first install Emscripten if you haven't done so. Here are instructions how to install it using emsdk: https://emscripten.org/docs/getting_started/downloads.html

Here are the steps to compile a new ggwave.js library, after you have modified the ggwave.h file:

# create a new build path for the Emscripten build
cd /path/to/ggwave
mkdir build-em
cd build-em

# activate the Emscripten compiler
source /path/to/emsdk/emsdk_env.sh

# configure and make the ggwave.js library
emcmake cmake ..
make ggwave

The produced ggwave.js will be available in ggwave/bindings/javascript/ggwave.js

ggerganov avatar Sep 13 '21 06:09 ggerganov