I was wondering how I could put some abstraction between winapi and winsock and my code. I want to make a tcp socket class, but I keep ending up with private variables that have winapi types. I have looked at type erasure and making fields void*, but the type I am using is created using a function that returns a non-pointer type.
SOCKET sock;
sock = socket(...);
How would I keep a private version of sock in my class? I have tried forward declaring, but it leads to issues because winapi uses a bunch of typdefs.
Edit: I guess I wasn't clear based on the results I'm getting from other people. I want to keep the variables from winapi out of my header file.