当前位置: 技术问答>linux和unix
unix域套接口用法
来源: 互联网 发布时间:2017-01-29
本文导语: #define MAXLINE 4096 int main() { int unfd; char line[MAXLINE + 1]; bzero(&unaddr, sizeof unaddr); unaddr.sun_family = AF_LOCAL; strcpy(unaddr.sun_path, "/tmp/sinfor"); #if 1 if ((unfd = socket(AF_LOCAL, SOCK_STREA...
#define MAXLINE 4096
int main()
{
int unfd;
char line[MAXLINE + 1];
bzero(&unaddr, sizeof unaddr);
unaddr.sun_family = AF_LOCAL;
strcpy(unaddr.sun_path, "/tmp/sinfor");
#if 1
if ((unfd = socket(AF_LOCAL, SOCK_STREAM, 0))