[En-Nut-Discussion] NutTcpCreateSocket / TCPSOCKET in C++
Bas Nedermeijer
basneder at tdlnx.student.utwente.nl
Tue Jun 13 22:10:17 CEST 2006
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
More information about the En-Nut-Discussion
mailing list