pkg load sockets

% Client Example
s = socket(AF_INET, SOCK_STREAM, 0)

% Connect to server on same machine at port 50000
serverinfo = struct(
   "addr", "localhost",
   "port", 50000
   )
status = connect(s, serverinfo)

% Message string
msg = "2 0.5 0.5 0.5 0.5 0.4 0.0 100 100 100 1 1 0.0 0 0 0 0 2 0 0 0 0 0 0 0 0"

% send message
send(s, typecast(uint32(length(msg)), 'uint8')) % send length of message
send(s, msg) % send message

disconnect(s)

