Example #1
0
int sock_test()
{
    int rc;
    
    pj_create_random_string(bigdata, BIG_DATA_LEN);

    rc = format_test();
    if (rc != 0)
	return rc;

    rc = gethostbyname_test();
    if (rc != 0)
	return rc;

    rc = simple_sock_test();
    if (rc != 0)
	return rc;

    rc = ioctl_test();
    if (rc != 0)
	return rc;

    rc = udp_test();
    if (rc != 0)
	return rc;

    rc = tcp_test();
    if (rc != 0)
	return rc;

    return 0;
}
Example #2
0
int sock_test()
{
    int rc;
    
    pj_create_random_string(bigdata, BIG_DATA_LEN);

// Enable this to demonstrate the error witn S60 3rd Edition MR2
#if 0
    rc = connect_test();
    if (rc != 0)
    	return rc;
#endif
    
    rc = format_test();
    if (rc != 0)
	return rc;

    rc = parse_test();
    if (rc != 0)
	return rc;

    rc = purity_test();
    if (rc != 0)
	return rc;

    rc = gethostbyname_test();
    if (rc != 0)
	return rc;

    rc = simple_sock_test();
    if (rc != 0)
	return rc;

    rc = ioctl_test();
    if (rc != 0)
	return rc;

    rc = udp_test();
    if (rc != 0)
	return rc;

    rc = tcp_test();
    if (rc != 0)
	return rc;

    return 0;
}
Example #3
0
// main
//////////////////////////////////////////////////////////////////
int main(int argc, char* argv[]) {

	std::string addr = "127.0.0.1";
	posix_input posix_input(conn_singleton::get().ios_);

	if( argc > 1)
		addr = argv[1]; 
	
	posix_input.init();
	conn_singleton::get().init();

	//tcp_test(addr);
	if(udp_test(addr)){	
		return -1;		
	}

	conn_singleton::get().start();					// wait until ctrl-c
	//conn_singleton::get().shutdown();				// it doesn't need 
	
	return 0;
}
Example #4
0
int main(int argc, const char* argv[])
{
	tcp_test();
	udp_test();
	return 0;
}