• Hello and welcome to our new forums. We upgraded our forum sites to a more robust and modern system which we hope you will enjoy. Be sure to check out your profile by clicking the button on the top right and configure your preferences, signature, time zone, avatar, etc. as you wish. If you need help with using this new forum'ware try the help link on the bottom right.

    Click here to review your account now.

Maintain connected sockets across process restart


New member
Dec 29, 2018
Programming Experience

A friend of mine has developed a software platform that is accessed over telnet. The program has the ability to restart itself when issued a command to load in new changes made to the code itself. When this happens, the connected sockets stay connected because they are passed to another process, and then back once the service has restarted.

He looked at porting it to dotnet core but one of the issues is the DuplicateAndClose() function is removed, which is how this was accomplished before. We have been thus far unable to locate a suitable replacement of DuplicateAndClose to keep the connected clients alive across the service restart and I'm looking for advice from the community on how we may accomplish this. Any ideas or help is appreciated.


C# Forum Moderator
Staff member
Apr 23, 2011
Sydney, Australia
Programming Experience
.NET source code is available publicly for you to read for yourself. You should r4ead the source code for that method to see how it is implemented and see whether you can do the same or similar yourself.
Top Bottom