I am new to socket programming. I'm tring to establish an UNIX domain socket with DATAGRAM. I look up the information about the configuration of sun_path in struct sockaddr_un for a while, seems like there are not enough sources to help me.
I created 3 files, unix_socket.c (provides an interface for socket connection), udp_server.c and udp_client.c, all are located in the directory "/home/Socket".
When I set the sun_path as "home/Socket", the server side always generates an error "Address already in use".
I also tried using "localSocket" and "echo_socket", but the client side always generates an error "No such file or directory".
I have no idea what's going on. Could anybody help me fix it? Really appreciate.
Thank you very much