1.求聊天系统中客户端通信C/C++源代码!讯源!讯源aspx源码怎么查找!讯源车php源码
2.手机通讯录管理中拨号的讯源网页商店源码源代码c语言编程
求聊天系统中客户端通信C/C++源代码!!讯源维加斯指标源码!讯源maven spring源码
#include "stdafx.h"
#include <Winsock2.h>
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
#pragma comment (lib,讯源"ws2_.lib")
int _tmain(int argc, _TCHAR* argv[])
{
WORD wVersionRequested;//版本号
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD( 2, 1 );//1.1版本的套接字
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 ) {
return 0;
}//加载套接字库,加裁失败则返回
if ( LOBYTE( wsaData.wVersion ) != 2 || HIBYTE( wsaData.wVersion ) != 1 ) {
WSACleanup( );
return 0;
}//如果不是讯源1.1的则退出
SOCKET sockClient = socket(AF_INET,SOCK_STREAM,0);//创建socket SOCK_STREAM表示TCP
if (sockClient==INVALID_SOCKET)
{
cout<<"INVALID_SOCKET"<<endl;
}
SOCKADDR_IN addrClient; //设置相关地址结构
cout<<"ip"<<endl;
char ip[]=".0.0.1";
cin>>ip;
addrClient.sin_addr.s_addr=inet_addr(ip);
addrClient.sin_family=AF_INET;
addrClient.sin_port=htons();//设置server端端口号,你可以随便设置
//连接
int x=connect(sockClient,讯源(SOCKADDR*)&addrClient,sizeof(SOCKADDR));
if (x==SOCKET_ERROR)
{
cout<<"连接出错"<<endl;
return 0;
}
while(1)
{
char ddb_send[]="\0";
cin>>ddb_send;
if (strcmp(ddb_send,"exit")==0)
break;
char * buf=ddb_send;
int y=send(sockClient,buf,,0);
if (y==SOCKET_ERROR)
cout<<"SOCKET_ERROR"<<endl;
}
closesocket(sockClient);//关闭
WSACleanup();
return 0;
}
手机通讯录管理中拨号的源代码c语言编程
IplImage* cameraImage = NULL;
while ((cameraImage = cvQueryFrame(capture)) != NULL)
{
cvShowImage("Camera",cameraImage);
cvWaitKey(1);
}
台積電創1080元新高!台股大漲382點攀24390點高峰
xes验证源码_xss验证代码
stgcn源码解读
现场答题 源码_现场答题 源码是什么
江西九江:优化营商环境 筑牢民生底线
悬赏app源码_悬赏平台源码