For this exercise a program is open a socket to localhost on port 256 and send the message "hello socket world" before closing the socket.

Catching any exceptions or errors is not required.




$ include "seed7_05.s7i";
  include "socket.s7i";
 
const proc: main is func
  local
    var file: sock is STD_NULL;
  begin
    sock := openInetSocket(256);
    writeln(sock, "hello socket world");
    close(sock);
  end func;