I am trying to use your sample nats in generator mode.
C:\HOMEWARE\nats-sample\cmake-build-debug\bin>nats-sample.exe -d --mode gen --address 127.0.0.1 --port 4222 --publish_interval 1000 --topic FOO
[2020-06-26 11:24:29.272] [console] [info] stats: messages 0 during 1 seconds
[2020-06-26 11:24:29.275] [console] [error] publish failed with error not connected
[2020-06-26 11:24:29.278] [console] [debug] got info {"client_id":84,"go":"go1.11.10","host":"0.0.0.0","max_payload":1048576,"port":4222,"proto":1,"server_id":"NDDKGVA5F5LTOQ6GBONFWXENTBAIWSWM5IMCHB6HS4OOZW7QFRVQXY3O","version":"2.0.0"}
[2020-06-26 11:24:29.290] [console] [info] on disconnected
[2020-06-26 11:24:29.291] [console] [error] async handshake failed wrong version number
[2020-06-26 11:24:29.292] [console] [error] connect failed with error wrong version number
[2020-06-26 11:24:29.295] [console] [debug] got info {"client_id":85,"go":"go1.11.10","host":"0.0.0.0","max_payload":1048576,"port":4222,"proto":1,"server_id":"NDDKGVA5F5LTOQ6GBONFWXENTBAIWSWM5IMCHB6HS4OOZW7QFRVQXY3O","version":"2.0.0"}
[2020-06-26 11:24:29.298] [console] [info] on disconnected
[2020-06-26 11:24:29.300] [console] [error] async handshake failed unspecified system error
[2020-06-26 11:24:29.302] [console] [error] connect failed with error unspecified system error
[2020-06-26 11:24:29.312] [console] [debug] got info {"client_id":86,"go":"go1.11.10","host":"0.0.0.0","max_payload":1048576,"port":4222,"proto":1,"server_id":"NDDKGVA5F5LTOQ6GBONFWXENTBAIWSWM5IMCHB6HS4OOZW7QFRVQXY3O","version":"2.0.0"}
[2020-06-26 11:24:29.313] [console] [info] on disconnected
[2020-06-26 11:24:29.315] [console] [error] async handshake failed unspecified system error
[2020-06-26 11:24:29.317] [console] [error] connect failed with error unspecified system error
[2020-06-26 11:24:29.323] [console] [debug] got info {"client_id":87,"go":"go1.11.10","host":"0.0.0.0","max_payload":1048576,"port":4222,"proto":1,"server_id":"NDDKGVA5F5LTOQ6GBONFWXENTBAIWSWM5IMCHB6HS4OOZW7QFRVQXY3O","version":"2.0.0"}
C:\HOMEWARE\nats-server-v2.0.0-windows-amd64>nats-server.exe -DVV
[22692] 2020/06/26 11:06:40.333104 [�[32mINF�[0m] Starting nats-server version 2.0.0
[22692] 2020/06/26 11:06:40.334101 [�[36mDBG�[0m] Go build version go1.13.10
[22692] 2020/06/26 11:06:40.335129 [�[32mINF�[0m] Git commit [bf0930e]
[22692] 2020/06/26 11:06:40.337379 [�[32mINF�[0m] Listening for client connections on 0.0.0.0:4222
[22692] 2020/06/26 11:06:40.337379 [�[32mINF�[0m] Server id is NAIF4QISWLDVN4HPMFPMBKWM752Q7FGQZTZJLMNO7BLGOTTR7R3WPF77
[22692] 2020/06/26 11:06:40.337379 [�[32mINF�[0m] Server is ready
[22692] 2020/06/26 11:06:40.337379 [�[36mDBG�[0m] Get non local IPs for "0.0.0.0"
[22692] 2020/06/26 11:06:40.353050 [�[36mDBG�[0m] ip=172.16.1.68
[22692] 2020/06/26 11:06:40.374994 [�[36mDBG�[0m] ip=192.168.1.42
[22692] 2020/06/26 11:06:44.655779 [�[36mDBG�[0m] 127.0.0.1:65229 - cid:1 - Client connection created
[22692] 2020/06/26 11:06:44.658859 [�[33mTRC�[0m] 127.0.0.1:65229 - cid:1 - ->> [-ERR Unknown Protocol Operation]
[22692] 2020/06/26 11:06:44.658859 [�[31mERR�[0m] 127.0.0.1:65229 - cid:1 - Client parser ERROR, state=0, i=0: proto='"\x16\x03\x01\x00\xbd\x01\x00\x00\xb9\x03\x03I\x1dts\x9a\xe7?\x02}\xbfkn}\x00\x04\x0f\x1cv̬\xb5"...'
[22692] 2020/06/26 11:06:44.660732 [�[36mDBG�[0m] 127.0.0.1:65229 - cid:1 - Client connection closed: Protocol Violation
[22692] 2020/06/26 11:06:44.669706 [�[36mDBG�[0m] 127.0.0.1:65230 - cid:2 - Client connection created
[22692] 2020/06/26 11:06:44.670704 [�[36mDBG�[0m] 127.0.0.1:65230 - cid:2 - Client connection closed: Client Closed
C:\HOMEWARE\nats-server-v2.0.0-windows-amd64>nats-server.exe -v
nats-server: v2.0.0