将nanomsg编译成lib库后调用即可。
#include <windows.h>
#include <cassert>
#include <cstdio>
#include <ctime>
#include <nanomsg/nn.h>
#include <nanomsg/pubsub.h>
#include <iostream>
#pragma comment(lib, "nanomsg.lib")
#define SERVER "server"
#define CLIENT "client"
char *date()
{
time_t raw = time(&raw);
struct tm *info = localtime(&raw);
char *text = asctime(