Esempio n. 1
0
int main(int argc, char** argv)
{
    unsigned short int udpPort;
    
    if(argc != 3)
    {
        fprintf(stderr, "usage: %s UDP_port filename_to_write\n\n", argv[0]);
        exit(1);
    }
        
    reliablyReceive(argv[1], argv[2]);
}
Esempio n. 2
0
int main(int argc, char** argv)
{
	unsigned short int udpPort;
	
	if(argc != 3)
	{
		fprintf(stderr, "usage: %s UDP_port filename_to_write\n\n", argv[0]);
		exit(1);
	}
	init_variable();
	udpPort = (unsigned short int)atoi(argv[1]);
	bind_udp(udpPort);
	reliablyReceive(udpPort, argv[2]);
}
int main(int argc, char** argv)
{
	char* udpPort;
	
	if(argc != 3)
	{
		fprintf(stderr, "usage: %s UDP_port filename_to_write\n\n", argv[0]);
		exit(1);
	}
	
	udpPort = argv[1];
	
	reliablyReceive(udpPort, argv[2]);
	return 0;
}