Thank you for your fast response, and as always it was right on. I think I have stared to long at the problem to notice it myself
For future references the solution for me was to add the following code:
s.Init();
One<Socket::Data> data = new Socket::Data;
s.Attach(data);
The reason for all of this; under *nix when you fork() or reload your own or other program with exec() all sockets are inherited. So for example by just adding
data->socket = 3;
in the above example you can continue working on it without interruption. Maybe an idea to add this feature as a function OldSocket/OpenedSocket besides the existing ClientSocket and ServerSocket?
I am not quite happy about this; I think Socket::Data should in fact be private. I guess Socket::Attach(SOCKET) would solve the problem, right?