Computer Science Canada Net.CloseConnection crashes |
Author: | timeisup [ Tue Mar 21, 2006 7:27 pm ] |
Post subject: | Net.CloseConnection crashes |
I do not know why but when ever i use Net.CloseConnection my program crashes with a General protection (segmentation) fault . Can someone help me please I am sorry if i'm double posting but i can't find help on this... ![]() |
Author: | Tony [ Wed Mar 22, 2006 12:41 am ] |
Post subject: | |
general errors suck due to their lack of description.. maybe you're using a wrong id for the connection? could you isolate the problem to a test case? |
Author: | timeisup [ Wed Mar 22, 2006 6:17 pm ] | ||
Post subject: | |||
sorry for not being specific but here is the easiest example of this problem
i fork the server and a client they connect but when i try to disconnect it; it gives me that error ; i've also tried to close the connection in the client ; neither of them have worked i don't think that it is my syntax but if it is please correct me |
Author: | Tony [ Thu Mar 23, 2006 3:39 pm ] | ||||
Post subject: | |||||
that cannot be right ![]() have you tried the code outside of processes?
and
if you compile both programs, you can run two executables at the same time. This way you don't have to worry about what's going on with processes. |
Author: | timeisup [ Thu Mar 23, 2006 5:33 pm ] |
Post subject: | |
Wow that worked...... ![]() ![]() |
Author: | Tony [ Thu Mar 23, 2006 9:43 pm ] |
Post subject: | |
procedure should work.. ![]() as for processes, it has to do with how they work. I'm not sure why you were using them without understanding of what they do exactly. Read up on some tutorials that try to explain the consepts. Basically the two forks take turns executing, in a not very organized manner.. In theory you should not be able to even establish a connection like this, as at no point you're opening and listening at the same time ![]() |