int sock; //send the check if(!net_connect(sock,host,port)){ net_send(sock,&tbs,sizeof(tbs)); } net_close(sock); }