Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Send Client Request to Server
- void *send_server_request( void *msg_to_snd) //where msg_to_snd is a struct
- {
- pthread_mutex_lock(&mutex1); //only one client can send a request at a time
- struct msgbuf *ms = (struct msgbuf *)msg_to_snd;
- msgsnd (msqid, &ms, sizeof(struct msgbuf) - sizeof(long), 0);
- pthread_mutex_unlock(&mutex1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement