Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   TCP IP socket programming (http://www.go4expert.com/forums/tcp-ip-socket-programming-t9136/)

boschow 5Mar2008 04:48

TCP IP socket programming
Hello all,

I am tring to implement TCP IP communication on the microcontroller, or should i say TCP IP is already implemented i am only about to use its functions. And I am tring to send some data from the microcontroller to the PC. The PC starts the connection so he is a client and the controller is the server.

The function i am using are the following:

CSS_SocketListen(UINT16 socket); // the function return the socket that is listening to
CSS_SocketRcv(UINT16 socket, UINT8 *data, UINT16 length, UINT8 time_in_ms); // returns socket ID
CSS_SocketSend(UINT16 socketHandle, UINT8 *data, UINT16 length); // return 0 if the send is sucessful, else return negative value
CSS_SocketClose(int socket); //closes the selected socket

The use of the function is identical to the descritpion. I am observing the TCP IP communication with ethereal. The syn and ack functions are occuring between the PC and the remote device, but why dosent the PC recieve some data that I have sent with the useing of the function CSS_SendSocket.

With the TCP IP communication I have to send also its header? If so how long is the header that I have to resend through the connection ? Is there anithing else I should be aware of ?

Thanks and
Best Regards,

All times are GMT +5.5. The time now is 14:12.