套接字绑定到(NULL) [英] Socket Bound To (NULL)

查看:72
本文介绍了套接字绑定到(NULL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的代码运行时,我收到一条消息,提示套接字绑定为空.那有什么好担心的吗?似乎嗅探器正在执行应做的事情.我在互联网上看到我的计算机的活动.

When my code runs I get a message that says Socket Bound To Null. Is that anything to worry about? It seems that the sniffer is doing what it is suppose to do. I see activity for my computer on the internet.

if (bind(thisSocket, (struct sockaddr *)&destination, sizeof(destination))<0){
		printf("\nBinding Socket FAILED!\n");
		if (thisSocket) closesocket(thisSocket);
		return 0;
	}
	printf("\nSocket bound to %s!", argv[1]);

推荐答案

与您的套接字无关,您是在自己编写该消息
It has nothing to do with your socket, you''re writing that message yourself
printf("\nSocket bound to %s!", argv[1]);


argv[1]为空或错误的指针(argc< 2)


argv[1] is either null or a bad pointer (argc < 2)


这篇关于套接字绑定到(NULL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆