Код
U8 tcp_get_socket (
U8 type, /* Type of TCP socket. */
U8 tos, /* Type Of Service. */
U16 tout, /* Idle timeout period before disconnecting. */
U16 (*listener)( /* Function to call when a TCP event occurs. */
U8 socket, /* Socket handle of the local machine. */
U8 event, /* TCP event such as connect, or close. */
U8* ptr, /* Pointer to IP address of remote machine, */
/* or to buffer containing received data. */
U16 par )); /* Port number of remote machine, or length */
/* of received data. */
U8 type, /* Type of TCP socket. */
U8 tos, /* Type Of Service. */
U16 tout, /* Idle timeout period before disconnecting. */
U16 (*listener)( /* Function to call when a TCP event occurs. */
U8 socket, /* Socket handle of the local machine. */
U8 event, /* TCP event such as connect, or close. */
U8* ptr, /* Pointer to IP address of remote machine, */
/* or to buffer containing received data. */
U16 par )); /* Port number of remote machine, or length */
/* of received data. */
U16 tout - время в секундах перед разъеденением. Т.е. если он 60, то через минуту сокета не станет. Мне нужно, чтобы сокет жил "вечно". Кто знает, как этого добиться? -1 не подходит.