I have a socket() function call in my code.(using C language):
socket(AF_INET, SOCK_STREAM, 0))
I want that it should result in error.(INVALID_SOCKET)
Do we have some way out so that above function call results in error.
Like stopping some services,etc
I have a socket() function call in my code.(using C language): socket(AF_INET, SOCK_STREAM, 0))
Share
Since you say this is in your code, you could define your own implementation of
socketthat always returns INVALID_SOCKET:If you link with the object file that defines your version of socket before linking with the real version, the linker will send all calls to
socketto your implementation.