i'm receiving characters from a socket and loading them into a buffer, i'm trying to concatenate the buffer into another character array and its not working. can anyone help me?
if i change strcat(engine::exbuff, buffer) to something like strcat(engine::exbuff, "hello world") it will do as it should. to me this doesn't really seem logical. i know there are charcters in the array since if i call another function i can return the value of rc, and that is 4. can anyone tell me what is wrong?PHP Code:
int rc = recv(engine::esock.sock, buffer, sizeof(buffer), 0);
if (rc != -1)
unsigned int value = unpack(buffer, buffer);
buffer[rc + 1] = '\0';
case(0): // creation accept