A net wrapper for Prescription the FRP library
This exposes the core node.js
net module as a set of functions that
return Prescription FRP
Observables instead of taking callbacks.
var net = require"prescription-net";// Create a server instancevar server = ;// Make the server listen on port 3000, we're only interested in the connection// Observable, so we subscribe() that one through and we subscribe to each of// the sockets it's emit back to themselves (echo server)serverlisten3000connectionsubscribeobservablessocketsubscribeobservablessocket;;
var net = require"prescription-net";var client = ;var observables = clientconnect3000;var connect = observablesconnect;var socket = observablessocket;socketmapreturn datatoString;subscribeconsole.logdata;;connectsubscribesocketonNext"beep bop boop";;