Both of you were correct, I had to flush my output and newline terminate it. 
The final result looks like:

(define (broadcast source destination type message port)
  (let ([h (hash 'source source 'dest destination
                 'type type 'message message)])
    (fprintf port "~a\n" (jsexpr->string h))
    (flush-output port))) 

I do have a couple of followup questions. Will flushing the output have issues 
when multiple bridges are active at once? The actual data packets are small 
enough that I doubt it'd overflow a buffer, if that helps. 
When I compile this program, I notice that it takes up 5MB of space. Is that 
because it's also compiling the c library that unix-socket wraps? Or is the 
JSON library that large?

Once again, thank you for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to