AnsweredAssumed Answered

problem with programming in C

Question asked by baert jonas on Apr 2, 2009
Latest reply on Apr 3, 2009 by Rich Testardi

The bord that I use is a demo52233DEMO and I'm using the coldfire lite stack => TCP_client

and I want to send unicode-encoded textual messages (packets) to a tcp server. I can already do that, but the methode I use is far to mutch work. Also I want to detect several unicode messages how can I do that? And my final question is how can I send a fin pakket when I reset the board? This is an example of the methode that I use for sending stuf.

 

 

 


    length = m_recv( emg_tcp_communication_socket, (char *)buffer, RX_BUFFER_SIZE );
   
    //--------alive ---------
    len = 54;
    data_alive[0]= 'a';
    data_alive[2]= 'l';
    data_alive[4]= 'i';
    data_alive[6]= 'v';
    data_alive[8]= 'e';
    data_alive[10]= ':';
    data_alive[12]= 'S';
    data_alive[14]= 't';
    data_alive[16]= 'i';
    data_alive[18]= 'l';
    data_alive[20]= 'l';
    data_alive[22]= ' ';
    data_alive[24]= 'a';
    data_alive[26]= 'l';
    data_alive[28]= 'i';
    data_alive[30]= 'v';
    data_alive[32]= 'e';
    data_alive[34]= ',';
   
    data_alive[36]= ' ';
    data_alive[38]= 's';
    data_alive[40]= 'e';
    data_alive[42]= 'r';
    data_alive[44]= 'v';
    data_alive[46]= 'e';
    data_alive[48]= 'r';
    data_alive[50]= '?';
    data_alive[52]= '\01';
    //----------------------
   

    (void)m_send( emg_tcp_communication_socket, (char *)data_alive, len );

 

greets jonas

Message Edited by jonasb on 2009-04-02 07:52 AM

Outcomes