Client: char request[RequestSize]; char reply[ReplySize] // ..compute.. // Put the request into the buffer. // Send the buffer to the server. write(output, request, RequestSize); // Wait for response. read(input, reply, ReplySize); // ..compute.. Server: char request[RequestSize]; char reply[ReplySize]; // Loop waiting for requests. while (1) { // Read incoming command. read(input, request, RequestSize); // Do operation. // Send result. write(output, reply, ReplySize); }