Welcome![Sign In][Sign Up]
Location:
Search - msgget server clie

Search list

[Linux-Unixmessage

Description: 该程序首先通过fork()函数分别创建Client进程和Server进程,然后通过msgget()函数创建消息队列,由Client使用msgsnd()函数向Server进程发送一个消息,Server进程通过msgrcv()函数从消息队列中接收到消息后,通过msgsnd()函数向Client进程发送回一个响应,之后,通过sleep()函数,等待Client进程从消息队列中读取了消息后,删除消息队列。-The program first by fork () function, create separate Client process and the Server process, then msgget () function to create message queue by the Client using the msgsnd () function to send a message to the Server process, Server process, through the msgrcv () function from the message queue to receive the message through the msgsnd () function to send back a response to Client process, followed by sleep () function to wait for Client process from the message queue to read the message, delete the message queue.
Platform: | Size: 1024 | Author: JK | Hits:

CodeBus www.codebus.net