📄 client.c
字号:
#include<stdio.h>#include<stdlib.h>#include<unistd.h>#include<sys/types.h>#include<sys/stat.h>#include<fcntl.h>#include<string.h> int main(){ char buff[200]; int fl,n,fl2; printf("FIFO's created"); fl=open("fifo1",O_WRONLY); printf("enter the filename"); scanf("%s",buff); printf("sending this filename to the server");write(fl,buff,strlen(buff));close(fl);printf("waiting for server reply"); fl2=open("fifo2",O_RDONLY); while((n=read(fl2,buff,128))>0) write(1,buff,n); close(fl2); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -