Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Segfaults with One container?
Re: Segfaults with One container? [message #23236 is a reply to message #23192] |
Fri, 02 October 2009 10:01 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
phirox wrote on Thu, 24 September 2009 06:25 |
luzr wrote on Thu, 24 September 2009 11:06 |
BTW, I must have missed something, but why you dont just keep using the same Socket after fork?
Mirek
|
Because fork was just an example of one of the methods. I use exec(), which starts a whole new process. I catch the HUP signal which reloads the binary, basically giving the ability to update my program without losing any connections. It does this by saving every class variable that is necessary in a sessions file(xml) and then loading it back in the new binary. Which then resumes the socket connections.
|
Well, Linger and NoDelay are not stored in member variables, so that leaves us with blocking. I was thinking about reading this value from system (on Attach), but it seems like this is not possible in Win32.
Therefore, for now:
void AttachSocket(Socket& socket, SOCKET s, bool blocking)
(Note this is a global function, because Socket is supposed to support SSL sockets too...).
Mirek
|
|
|
Goto Forum:
Current Time: Tue May 14 09:55:27 CEST 2024
Total time taken to generate the page: 0.02726 seconds
|