Run c++ on Ubuntu.
I open socket in this way:
socket(AF_PACKET, SOCK_RAW, IPPROTO_RAW))
What do i need to do in the end of the use?
Some socket will be used as long as the program run , do i need to check them from a while? to see if socket still exist?
The socket exists until you call
closeon its file descriptor. Since you have a raw IP socket, there’s no notion of “being alive”. Just close it when you’re done using it.