Page 1 of 1

Problem with TCP_MultiSocket Example

Posted: Thu Apr 12, 2012 9:09 pm
by dkoste01
Hello,
I started playing around with the NetBurner (I'm new to it) and started messing around with the example code. What I wanted to do is modify the TCP_MultiSocket code so that upon a specific command, it will writestring of all connected IP addresses to whoever wrote the command. As I was testing it, it worked, with the exception that after I use the command, every client OTHER than the one that used the command get disconnected by the code in the

Code: Select all

if ( FD_ISSET( fd_array[i], &error_fds ) )
            {
               iprintf( "Error on fd[%d], closing connection\r\n", i );
               close( fd_array[i] );
               fd_array[i] = 0;
               ip_array[i] = 0;
            }
I tried debugging but like I said I'm net to NetBurner and kind of don't know where to start. Any help would be greatly appreciated.