I am writing a code to connect to a socket.
But when I use the function MySocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); it always returns invalid socket.
I don´t know why this happens.

Any light would be very appreciated.

Thanks