18 lines
480 B
C
18 lines
480 B
C
|
/*************************************************************************
|
||
|
> File Name: test_socket.c
|
||
|
> Author: TianLun Song
|
||
|
> Mail: songtianlun@frytea.com
|
||
|
> Blog: https://blog.frytea.com
|
||
|
> Created Time: Thu 14 Jan 2021 06:51:32 PM CST
|
||
|
************************************************************************/
|
||
|
#include<stdio.h>
|
||
|
#include<sys/socket.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int fd = (AF_UNIX,SOCK_DGRAM,0);
|
||
|
printf("socket name: %s", getsocketname(fd));
|
||
|
return 0;
|
||
|
}
|
||
|
|