Hi! I've been trying to learn socket programming, but have run into a problem. I copied one of the server examples from Beej's Guide to Network Programming and have been using a data generator a friend of mine made a while ago. It connects once, all the data goes through, but when it gets to the accept() call in the while loop again I get a segmentation fault.
Here is my code http://codeviewer.org/view/code:fed and here is an example of what the data generator is sending (not sure if it's relevant, but whatevs):
Code:
00000000001-0101010101010101010|2010-06-16 10:56:07.030374|1234567891234567891|1|1234567891234567891\n
It is 101 characters long, sent in plaintext, including the newline at the end.
I ran it through gdb, just to try to figure stuff out and here is the output from that: http://codeviewer.org/view/code:fee
Thanks, and if you need any more info from me please let me know