Arc Forumnew | comments | leaders | submitlogin
3 points by christianbryant 427 days ago | link | parent

How about UDP calls? I sucked this CL snippet a while back (sorry I don't have the author info at hand). Creates a socket, sends data and receives data:

  (defun create-client (port buffer)
     (let ((socket (usocket:socket-connect "" port
  '(unsigned-byte 8))))
	   (format t "Sending data~%")
	   (replace buffer #(1 2 3 4 5 6 7 8))
	   (format t "Receiving data~%")
	   (usocket:socket-send socket buffer 8)
	   (usocket:socket-receive socket buffer 8)
	   (format t "~A~%" buffer))
      (usocket:socket-close socket))))

2 points by hjek 401 days ago | link

Check the Racket docs on UDP[0]. Arc itself is very high-level, but you can do more low-level stuff via Racket interop.