1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TCP IP socket programming

Discussion in 'C' started by boschow, Mar 4, 2008.

  1. boschow

    boschow New Member

    Joined:
    Feb 22, 2007
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    0
    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:
    Code:
    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,
    BoSCHoW.
     

Share This Page