The code to detect a tcp port

2009-05-13 04:20:51来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


               
#include
#include
#include
#include
#include
#include
#include
#include
#include
int main(int argc, char **argv)
{
    int s;
    int err = 0;
    int port;
    struct sockaddr_in sa;
    long arg;
    fd_set fset;
    struct timeval tv;
    int timeout = 1;
   
    if (argc  3)
        timeout = atoi(argv[3]);
        
    port = atoi(argv[2]);
    s = socket(AF_INET, SOCK_STREAM, 0);
    if (s
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/132/showart_159987.html

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:基于OpenBSD的宽带上网共享和网络服务

下一篇:我与FreeBSD的故事(一) 3D风波