⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prueba.c

📁 最新rtlinux内核源码
💻 C
字号:
/******************************************************************************//* This file has been written by Sergio Perez Alca駃z <serpeal@upvnet.upv.es> *//*            Departamento de Inform醫ica de Sistemas y Computadores          *//*            Universidad Polit閏nica de Valencia                             *//*            Valencia (Spain)                                                *//*                                                                            *//* The RTL-lwIP project has been supported by the Spanish Government Research *//* Office (CICYT) under grant TIC2002-04123-C03-03                            *//******************************************************************************/#include <stdlib.h>#include <unistd.h>#include <time.h>int main(int argc, char *argv[]) {  int i;  int max_iterations = 1000;  struct timespec time;  char tcporder[]="./tcpClient 158.42.58.141 Hello_baby";  char udporder[]="./udpClient 158.42.58.141 Hello_baby";  char command[60];  time.tv_sec = 0;  time.tv_nsec = 50000;  if(argc == 2)    max_iterations = atoi(argv[1]);  for(i=0; i< max_iterations; i++){    sprintf( &command[0],"%s%d %s", tcporder, i, "> /dev/null");    if(system(&command[0])==-1) break;    sprintf( &command[0],"%s%d %s", udporder, i, "> /dev/null");    if(system(&command[0])==-1) break;  }  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -