![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Socket
文章平均质量分 78
awu999328
这个作者很懒,什么都没留下…
展开
-
Windows Socket 编程 : 支持多线程(TCP)(环境:VS2010)
1. UserMesInfo.h 公共文件,客户端和服务器端公用;#ifndef User_Mes_Sock#define User_Mes_Sock#include #endifconst short MesLogin = 1001;const short MesError = 1002;const short MesNormal = 100转载 2014-03-26 13:01:21 · 8501 阅读 · 1 评论 -
更改IP地址及DNS地址
快速更改IP地址及DNS地址 netsh interface ip set 命令由于工作环境的变换或内外网切换时,使ip地址不得不频繁的更换 ,为了避免更改ip地址带来的麻烦,用dos命令做一个批处理文件来实现ip地址和dns地址的快速更改。一、命令介绍这里用到的DOS命令是:netsh interface ip set (address/dns) 或简写为 netsh int转载 2014-03-26 13:04:35 · 874 阅读 · 0 评论 -
socket端口如何解除bind
转自:1. 如果在已经处于 ESTABLISHED状态下的socket(一般由端口号和标志符区分)调用closesocket(一般不会立即关闭而经历TIME_WAIT的过程)后想继续重用该socket:BOOL bReuseaddr=TRUE;setsockopt(s,SOL_SOCKET ,SO_REUSEADDR,(const char*)&bReuseaddr,siz转载 2014-04-25 14:53:52 · 9580 阅读 · 0 评论 -
一个简单的UDP广播例子(含C/S)
转自一个简单的UDP广播通讯的例子程序,含有服务端和客户端的代码// 服务端// BoardCast_Server.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #pragma comment(lib, "WS2_32.li转载 2014-04-25 14:58:55 · 952 阅读 · 0 评论