diff --git a/examples/old/1_socketlike/bob.c b/examples/old/1_socketlike/bob.c deleted file mode 100644 index 5457309363001adbd3038b6ec3c720b27958e6dc..0000000000000000000000000000000000000000 --- a/examples/old/1_socketlike/bob.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include "../../reowolf.h" -#include "../utility.c" - -int main() { - - // Protocol is hard-coded. - char* pdl = - "primitive forward(in i, out o) {" - " while(true) synchronous { " - " put(o, get(i)); " - " } " - "} "; - - // setup a connector with one incoming network channel. - Connector* c = connector_new(); - printf("configuring...\n"); - check("config ", connector_configure(c, pdl, "forward")); - check("bind 0 ", connector_bind_active(c, 0, "127.0.0.1:7000")); - check("bind 1 ", connector_bind_native(c, 1)); - check("connect ", connector_connect(c, 5000)); - - // receive a message and print it to stdout three times - int i, msg_len; - const unsigned char * msg; - for (i = 0; i < 3; i++) { - check("get ", connector_get(c, 0)); - check("sync", connector_sync(c, 1000)); - check("read", connector_gotten(c, 0, &msg, &msg_len)); - printf("Received one message `%.*s`!\n", msg_len, msg); - } - - printf("cleaning up\n"); - connector_destroy(c); - return 0; -} \ No newline at end of file