Welcome![Sign In][Sign Up]
Location:
Search - winsock.h

Search list

[CSharptestudp

Description: 该代码为windows环境下利用winsock.h进行TCP/IP协议传输-code for the windows environment using winsock.h for TCP / IP transmission
Platform: | Size: 1826 | Author: 王志宇 | Hits:

[OtherPostForum

Description: /*** *** *** *** **/ /* 灌水机 源代码 */ /* PostForum.cpp */ /********************************************/ #include #include #include <winsock.h> main(int argc,char *argv[]){ char buff[4096] SOCKET sock SOCKADDR_IN addr
Platform: | Size: 1166 | Author: liuchao | Hits:

[WinSock-NDISMyFtpServ

Description: 一个简单的FTP的源码 编译环境:VC6.0. 编译方法:编译前先将本机上的VC98文件夹下的winsock.h搜索到并删除, 然后开始编译,并将windows.h文件中的以下语句删除: #else #include<winsock.h> 最后编译就可以通过了。 使用方法:将本工程const.h文件中的相应设置进行更改,就可以用leapftp进行连接了 (目前尚不能支持其他的ftp客户端软件)
Platform: | Size: 15956 | Author: Alex Zhou | Hits:

[Streaming Mpeg4H.263H.263+

Description: 本文对 H.263/H.263+视频编解码系列的基本原理、系统结构和压缩方法等做了简 要分析,并对运动估计方法作了算法上的改进,提出了一种提前预测运动矢量分级搜索 的方法,该算法搜索点少,运算量小,精度也比较高。在此基础上,以H.263/H.263+视 频编解码算法为核心,结合Winsock编程和多线程处理等技术,在局域网内实现了基于 PC机的图像实时传输。另外,结合TI公司的高性能定点处理芯片TMS320C6416的结 构和特点,利用多种优化方法,对H.263/H.263+的编码程序进行代码级的优化,并最终 在TMS320C6416 DSP芯片上实现了对H.263/H.263+视频编码过程的实时处理,获得了 良好的压缩效果和处理效率。
Platform: | Size: 3936585 | Author: liu | Hits:

[Internet-Network一个判断远程主机存活程序代码

Description: 一个判断远程主机存活程序代码(ping) #include #include #include #include #include "winsock.h" #pragma comment(lib,"Ws2_32"); #define SEND_SIZE 32 #define PACKET_SIZE 4096 #define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 struct icmp { unsigned char icmp_type; unsigned char icmp_code; unsigned short icmp_cksum; unsigned short icmp_id; unsigned short icmp_seq; unsigned long icmp_data; }; struct ip { unsigned char ip_hl:4; unsigned char ip_v:4; unsigned char ip_tos; unsigned short ip_len; unsigned short ip_id; unsigned short ip_off; unsigned char ip_ttl; unsigned char ip_p; unsigned short ip_sum; unsigned long ip_src; unsigned long ip_dst; }; unsigned char sendpacket[PACKET_SIZE]; unsigned char recvpacket[PACKET_SIZE]; struct sockaddr_in dest_addr; struct sockaddr_in from_addr; int sockfd; int pid; unsigned short cal_chksum(unsigned short *addr,int len); int pack(int pack_no); int unpack(unsigned char *buf,int len); void send_packet(void); void recv_packet(void); void main(int argc,char *argv[]) { struct hostent *host; struct protoent *protocol; WSADATA wsaData; int timeout=1000; int SEND_COUNT=4; int i; char *par_host; par_host=argv[argc-1]; //IP赋值 switch(argc) { case 2: break; case 3: if(strcmp(argv[1],"-t")==0) { SEND_COUNT=10000; break; } //fall through default: printf("usage: %s [-t] Host name or IP address\n",argv[0]); exit(1); } if(WSAStartup(0x1010,&wsaData)!=0) { printf("wsastartup error\n"); exit(1); } if( (protocol=getprotobyname("icmp") )==NULL) { printf("getprotobyname error\n"); exit(1); } /* printf("%s\n",protocol->p_name); printf("%s\n",protocol->p_aliases); printf("%d\n",protocol->p_proto); system("pause"); */ if( (sockfd=socket(AF_INET,SOCK_RAW,protocol->p_proto) )<0) { printf("socket error\n"); exit(1); } if(setsockopt(sockfd,SOL_SOCKET,SO_RCVTIMEO,(char*)&timeout,sizeof(timeout))h_length); //resolve address to hostname if(host=gethostbyaddr(host->h_addr,4,PF_INET)) par_host=host->h_name; // //printf("%s\n",par_host); // } else if( dest_addr.sin_addr.s_addr=inet_addr(par_host)==INADDR_NONE) { printf("Unkown host %s\n",par_host); exit(1); } pid=getpid(); /* printf("%d\n",pid); system("pause"); */ printf("Pinging %s [%s]: with %d bytes of data:\n\n",par_host,inet_ntoa(dest_addr.sin_addr),SEND_SIZE); for(i=0;i1) { sum+=*w++; nleft-=2; } if( nleft==1) { *(unsigned char *)(&answer)=*(unsigned char *)w; sum+=answer; } sum=(sum>>16)+(sum&0xffff); sum+=(sum>>16); answer=~sum; return answer; } //打包 int pack(int pack_no) { int packsize; struct icmp *icmp; packsize=8+SEND_SIZE; icmp=(struct icmp*)sendpacket; icmp->icmp_type=ICMP_ECHO; icmp->icmp_code=0; icmp->icmp_cksum=0; icmp->icmp_seq=pack_no; icmp->icmp_id=pid; icmp->icmp_data=GetTickCount(); icmp->icmp_cksum=cal_chksum( (unsigned short *)icmp,packsize); /*校验算法*/ return packsize; } //解包 int unpack(unsigned char *buf,int len) { struct ip *ip; struct icmp *icmp; double rtt; int iphdrlen; ip=(struct ip *)buf; iphdrlen=ip->ip_hl*4; icmp=(struct icmp *)(buf+iphdrlen); if( (icmp->icmp_type==ICMP_ECHOREPLY) && (icmp->icmp_id==pid) ) { len=len-iphdrlen-8; rtt=GetTickCount()-icmp->icmp_data; printf("Reply from %s: bytes=%d time=%.0fms TTL=%d icmp_seq=%u\n", inet_ntoa(from_addr.sin_addr), len, rtt, ip->ip_ttl, icmp->icmp_seq); return 1; } return 0; } //发送 void send_packet() { int packetsize; static int pack_no=0; packetsize=pack(pack_no++); if( sendto(sockfd,(char *)sendpacket,packetsize,0,(struct sockaddr *)&dest_addr,sizeof(dest_addr) )=0) success=unpack(recvpacket,n); else if (WSAGetLastError() == WSAETIMEDOUT) { printf("Request timed out.\n"); return; } }while(!success); } UID5380 帖子239 精华0 积分1289 阅读权限40 来自软件学院 在线时间81 小时 注册时间2006-5-22 最后登录2007-2-24 查看详细资料 TOP
Platform: | Size: 5881 | Author: shuiyuan313 | Hits:

[Windows DevelopWinSock Win32 API 的打包类和例子程序winsocket

Description: WinSock Win32 API 的打包类和例子程序Win Sock Win32 API 的打包类和例子程序WinSock Win32 API 的打包类和例子程序-Windows socket sample
Platform: | Size: 53248 | Author: e_man518 | Hits:

[CSharptestudp

Description: 该代码为windows环境下利用winsock.h进行TCP/IP协议传输-code for the windows environment using winsock.h for TCP/IP transmission
Platform: | Size: 2048 | Author: 王志宇 | Hits:

[Windows DevelopTestSer.tar

Description: 使用winsock控件,在vc++6.0环境下编写的服务端程序,供参考-using winsock control, vc 6.0 environment prepared by the process server for reference
Platform: | Size: 256000 | Author: 张海峰 | Hits:

[OtherPostForum

Description: /*** *** *** *** **/ /* 灌水机 源代码 */ /* PostForum.cpp */ /********************************************/ #include #include #include <winsock.h> main(int argc,char *argv[]){ char buff[4096] SOCKET sock SOCKADDR_IN addr -/***********************//* Irrigation machine source code*//* PostForum.cpp*//********************************************/# include# include# include
Platform: | Size: 1024 | Author: liuchao | Hits:

[Internet-NetworkWindowsinternet_code_vc++

Description: 网络与通信程序设计 对网络与通信程序设计书籍的附带CD源码教程-Network and communication program design for network and communications programming book source attached CD Tutorial
Platform: | Size: 562176 | Author: 方剑 | Hits:

[Ftp ClientMyFtpServ

Description: 一个简单的FTP的源码 编译环境:VC6.0. 编译方法:编译前先将本机上的VC98文件夹下的winsock.h搜索到并删除, 然后开始编译,并将windows.h文件中的以下语句删除: #else #include<winsock.h> 最后编译就可以通过了。 使用方法:将本工程const.h文件中的相应设置进行更改,就可以用leapftp进行连接了 (目前尚不能支持其他的ftp客户端软件)-A simple FTP source compiler environment: VC6.0. Compilers Methods: compiled before the first machine Vc98 this folder and delete winsock.h search, and then began to compile and document the following windows.h delete statement:# else# include <winsock.h> final compiler can be adopted. Usage: const.h this project will document the corresponding change settings, you can use to connect the leapftp (currently not yet support other ftp client software)
Platform: | Size: 15360 | Author: Alex Zhou | Hits:

[Streaming Mpeg4H.263H.263+

Description: 本文对 H.263/H.263+视频编解码系列的基本原理、系统结构和压缩方法等做了简 要分析,并对运动估计方法作了算法上的改进,提出了一种提前预测运动矢量分级搜索 的方法,该算法搜索点少,运算量小,精度也比较高。在此基础上,以H.263/H.263+视 频编解码算法为核心,结合Winsock编程和多线程处理等技术,在局域网内实现了基于 PC机的图像实时传输。另外,结合TI公司的高性能定点处理芯片TMS320C6416的结 构和特点,利用多种优化方法,对H.263/H.263+的编码程序进行代码级的优化,并最终 在TMS320C6416 DSP芯片上实现了对H.263/H.263+视频编码过程的实时处理,获得了 良好的压缩效果和处理效率。
Platform: | Size: 3936256 | Author: liu | Hits:

[Internet-Networkwinsockchat

Description: I ve done alot of hard work to bring you an easy way to use winsock in your applications. This code is well commented. Shows how to use SOCKETS, winsock2.h and alot of other stuff. Connect, Listen, Send Data, Get data etc. I created a class to make it easy to use winsock. It s portable to other code. I created a small application in console mode (for simplicity on my part since i dont know much MFC and i didnt want to create an OpenGL interface) called "WeakStick Chat". This code can be improved apon, so please let me know if you do.
Platform: | Size: 12288 | Author: | Hits:

[VC/MFCWinsockAPI

Description: Windpows Sockets 是广泛应用的、开放的、支持多种协议的网络编程接口,主要由winsock.h头文件和动态链接库winsock.dll组成。本文详细介绍windows下socket api的应用 -Windpows Sockets is a widely used, open, multi-protocol network programming interfaces, mainly by winsock.h header files and dynamic link libraries winsock.dll composition. This paper describes the application of windows under the socket api
Platform: | Size: 69632 | Author: 宋若军 | Hits:

[Dialog_WindowPSB_WINDOWS

Description: 该程序是用C语言编写的,基于windows图形界面编程,调用了Win32.h,WinSock.h库和plink,用plink更方便快捷的执行远程主机上的命令,Plink是PuTTY 的命令行连接工具,主要用于自动化工作的处理,主要有视窗和讯息,socket通信,MD5加密函数,最小托盘功能的实现-The program is written in C, windows-based graphical programming interface, call the Win32.h, WinSock.h library and plink, plink more convenient and efficient implementation of the command on the remote host of Plink PuTTY command-line connection toolmainly used for automated processing, the main window and the message, socket communication, MD5 encryption function, the minimum tray function
Platform: | Size: 196608 | Author: cc | Hits:

[Sniffer Package capturexHook

Description: 这个工具采用的是HOOK进程的winsock API,把一些数据记录下来。 2.1 patch静态文件,即运行前挂钩. 2.2 也是修改IAT,跟1.1一样. 2.3 修改目标函数的前几个字节,跳转到新的函数,但不再调用原始函数,无 实际意义,作者只是做演示? 2.4 这种方法(3.2.3 保存原始函数)很COOL,其中的亮点和难点就是“获取任意 地址的指令长度”。 之前我也想用2.4这种办法,但卡在如何“获取任意地址的指令长度”上面了:( 在看到《挂钩Windows API》这篇文章之前,我取了一个比较简单有效的办法: 3.1 把目标函数的DLL COPY一份到内存中,修改原目标函数的前几字节,跳转 到我们的函数,在我们的函数中调用原函数新的COPY。-AppWizard has created this xHook DLL for you. This file contains a summary of what you will find in each of the files that make up your xHook application. xHook.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. xHook.cpp This is the main DLL source file. xHook.h This file contains your DLL exports. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named xHook.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize.
Platform: | Size: 58368 | Author: yunfeng | Hits:

[OS programSOCKET

Description: 为了让同学们更好的理解Socket的底层运作原理,Linux平台下只能使用底层库socket(socket.h),Windows平台下只能使用Winsock(winsock.h),请勿使用其它高层封装的Socket库(如Java库,MFC等)。-Linux platform in order to allow students to better understand the underlying principle of operation of the Socket can only use the the underlying repository socket (socket.h for the) Windows platform only use Winsock (winsock.h), do not use other high-level package Socket libraries (such as Java libraries, MFC, etc.).
Platform: | Size: 452608 | Author: 柳欢 | Hits:

[Linux-UnixXwinsock

Description: This header file has for sole purpose to allow to include winsock.h without getting any name conflicts with our code.
Platform: | Size: 15360 | Author: wltrven | Hits:

[AI-NN-PR本小姐的介绍

Description: 该代码为windows环境下利用winsock.h进行TCP/IP协议传输好(The code is transmitted by winsock.h for TCP/IP protocol under the windows environment)
Platform: | Size: 4656128 | Author: U盾佛光都有 | Hits:

[Books时尚全图型个人简历PPT模板

Description: 中存放的是h.263视频编码器和解码器的程序代码。 \播放工具 目录中存放的是用于播放YUV格好(It is stored in the program code of H.263 video encoder and decoder. The play tool directory is stored for the play of the YUV grid)
Platform: | Size: 12972032 | Author: 查处白 | Hits:
« 12 »

CodeBus www.codebus.net