What is Nostr?
dave /
npub1tsg…htk4
2023-02-08 05:05:18
in reply to nevent1q…ddns

dave on Nostr: Me: #include <stdio.h> #include <libnostr.h> int main(){ // 初始化客户端 ...

Me:

#include <stdio.h>
#include <libnostr.h>

int main(){

// 初始化客户端
nostr_init("127.0.0.1", 8888);

// 建立连接
nostr_connect();

// 发送消息
char *msg = "Hello, world!";
nostr_send(msg);

// 接收消息
char recv_msg[1024] = {0};
nostr_recv(recv_msg);

// 打印接收到的消息
printf("%s\n",recv_msg);

// 关闭连接
nostr_close();

return 0;
}
Author Public Key
npub1tsgw6pncspg4d5u778hk63s3pls70evs4czfsmx0fzap9xwt203qtkhtk4