interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / net / tests / nosup.om

24 lines · 572 bytes Raw Blame History
1note seed/net/tests/nosup.om -- a program built without TLS (http.om + notls.om) must refuse
2note every byte on a connection whose transport is not plain TCP (HXPORT 1): the three
3note transport functions return HENOSUP. Exit 0 = all three refused; 1..3 name the one that did not.
4fn main to int
5cs = new ulong 320 0
6io = new uchar 4096 0
7d = new uchar 64 0
8r = hinit cs io 0 0
9if ne r 0
10ret 9
11end
12put cs HXPORT 1
13if ne hrecvio cs io 0 16 HENOSUP
14ret 1
15end
16if ne hrecvd cs io d HENOSUP
17ret 2
18end
19if ne hsendio cs io get cs HWB 1 HENOSUP
20ret 3
21end
22put cs HOPEN 0
23ret 0
24end