fszmq


Hello World client

Connects REQ socket to tcp://localhost:5555

Sends "Hello" to server, expects "World" back

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
#r @"fszmq.dll"
open fszmq

let main () =
  printfn "Connecting to hello world server..."
  use context = new Context ()
  use requester = Context.req context
  Socket.connect requester "tcp://localhost:5555"

  for request_nbr in 0 .. 9 do
    printfn "Sending Hello %d..." request_nbr
    Socket.send requester "Hello"B
    let _buffer = Socket.recv requester
    printfn "Received World %d" request_nbr

  0 // return code
module docs
module PATH

from docs
val hijack : unit -> unit

Full name: docs.PATH.hijack
namespace fszmq
val main : unit -> int

Full name: Hwclient.main
val printfn : format:Printf.TextWriterFormat<'T> -> 'T

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
val context : System.IDisposable
val requester : System.IDisposable
val request_nbr : int32
val release : unit -> unit

Full name: docs.PATH.release
Fork me on GitHub