1

how to send acknowledgment byte for Retranslator

Topic: how to send acknowledgment byte for Retranslator

hello gurtam team, how i can send acknowledgment byte 0x11 for retranslator? here is my code but it does not works ...
Written in C++

if (s==INVALID_SOCKET){/* error handling code*/}       
      else{        
       char Buffer[512]; // Packet Buffer
       int recbyte = recv(s,Buffer,256,0);  
       for(int count = 0; count < recbyte; count++){
       if(full == ""){full = Buffer[count];}
               else{full = full+Buffer[count];} 
              }   
        
       //Here i want send acknowledgment Byte
              
        send(s, "\0x11", 4, 0);




         cout <<   full << "\n";
         WSACleanup(); //Clean up Winsock
         full = "";
         socket_listen();        

            }//Accept
Великий и ужасный Гиоргий Каладзе
2

how to send acknowledgment byte for Retranslator

Re: how to send acknowledgment byte for Retranslator

If you want to send 0x11. You must fill array bytes, for example: "char buff[1] = {0x11};" and send to socket.

if (s==INVALID_SOCKET) {
       /* error handling code*/
} else {        
       char Buffer[512]; // Packet Buffer
       int recbyte = recv(s,Buffer,256,0);  
       for(int count = 0; count < recbyte; count++) {
               if(full == "") {
            full = Buffer[count];
        } else {
            full = full+Buffer[count];
        } 
       }   
        
       //Here i want send acknowledgment Byte
        char buff[1] = {0x11};
        send(s, buff, 1, 0);

         cout <<   full << "\n";
         WSACleanup(); //Clean up Winsock
         full = "";
         socket_listen();        

}//Accept