postgres hook 测试成功

This commit is contained in:
2026-03-13 01:59:05 +00:00
parent a153ca5040
commit 544f532bf5
53 changed files with 5964 additions and 1674 deletions

View File

@@ -0,0 +1,33 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
int main()
{
int fd = socket(AF_UNIX, SOCK_STREAM, 0);
struct sockaddr_un addr;
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, "/tmp/zvfs.sock");
connect(fd, (struct sockaddr*)&addr, sizeof(addr));
char *msg = "hello reactor\n";
write(fd, msg, strlen(msg));
char buf[4096];
int n = read(fd, buf, sizeof(buf));
printf("echo: %.*s\n", n, buf);
close(fd);
return 0;
}