AW: [En-Nut-Discussion] NutTcpCreateSocket / TCPSOCKET in C++

Ernst Stippl ernst at stippl.org
Thu Jun 15 10:44:18 CEST 2006


Hi Bas!

Have you thought about stack size? Mysteriously restarting programs often
scramble the stack and -- off they go --. I do not know if C++ has any
specific stack size requirements, but maybe it is worthwhile to dig in
there.

regards
Ernst 

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Bas Nedermeijer
Gesendet: Dienstag, 13. Juni 2006 22:10
An: Ethernut User Chat (English)
Betreff: [En-Nut-Discussion] NutTcpCreateSocket / TCPSOCKET in C++

Hello,

we are trying to create a socket-connection in C++ (in NutOS), but somehow
the program just stops in the middle of the program, and restarts. This
happens when creating the socket in a class of the program.

When creating the tcpsocket in main(), it does succeed. (I took some
code-examples from tcps.c)

Snippet of code:

"
   this->_socket = NutTcpCreateSocket();

   printf("Socket no. : %i\n",this->_socket);
   printf("Local address: (%s)\n",inet_ntoa(this->_socket->so_local_addr));

   NutSleep(1000);

   printf("DONE!\n");

"
(decl. of _socket:
 	TCPSOCKET*	_socket;
)

Output:

"
Socket no. : 4230
Local address: (0.0.0.0)


"

It never gets to the "DONE" part, after this the application starts over.


Am i missing something? Or am i looking in the wrong direction?


 	Kind Regards, Bas Nedermeijer
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.3/360 - Release Date: 09.06.2006



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.4/364 - Release Date: 14.06.2006





More information about the En-Nut-Discussion mailing list