本次创建一个c++ 的websocket客户端,不依赖于其他库

头文件

#ifndef _WS_CLIENT_H
#define _WS_CLIENT_H#ifdef _WIN32
#define _CRT_SECURE_NO_WARNINGS
#define WIN32_LEAN_AND_MEAN
#include <fcntl.h>
#include <WinSock2.h>
#include <WS2tcpip.h>
#pragma comment( lib, "ws2_32" )
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <io.h>
#ifndef _SSIZE_T_DEFINED
typedef int ssize_t;
#define _SSIZE_T_DEFINED
#endif
#ifndef _SOCKET_T_DEFINED
typedef SOCKET socket_t;
#define _SOCKET_T_DEFINED
#endif
#ifndef snprintf
#define snprintf _snprintf_s
#endif#include <stdint.h>#define socketerrno WSAGetLastError()
#define SOCKET_EAGAIN_EINPROGRESS WSAEINPROGRESS
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
#else
#include <fcntl.h>
#include <netdb.h>
#include <netinet/tcp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdint.h>
#ifndef _SOCKET_T_DEFINED
typedef int socket_t;
#define _SOCKET_T_DEFINED
#endif
#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
#endif
#ifndef SOCKET_ERROR
#define SOCKET_ERROR   (-1)
#endif
#define closesocket(s) ::close(s)
#include <errno.h>
#define socketerrno errno
#define SOCKET_EAGAIN_EINPROGRESS EAGAIN
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
#endif#include <string>
#include <vector>
#include <memory>
#include <thread>
#include <condition_variable>
using namespace std;
typedef void(*callback_message_recv)(void * pUser,const char * message, int len, int type);
#define ws_text 1
#define ws_binary 2
typedef enum readyStateValues
{ CLOSING, CLOSED, CONNECTING, OPEN
}readyStateValues;
class WebSocket
{struct wsheader_type {unsigned header_size = 0;bool fin = true;bool mask = true;enum opcode_type {CONTINUATION = 0x0,TEXT_FRAME = 0x1,BINARY_FRAME = 0x2,CLOSE = 8,PING = 9,PONG = 0xa,} opcode;int N0 = 0;uint64_t N = 0;uint8_t masking_key[4];};
private:bool useMask = true;socket_t sockfd = INVALID_SOCKET;std::vector<uint8_t> rxbuf;std::vector<uint8_t> txbuf;template <class Iterator>void sendData(wsheader_type::opcode_type type, uint64_t message_size, Iterator message_begin, Iterator message_end);
public:readyStateValues readyState = OPEN;// http://tools.ietf.org/html/rfc6455#section-5.2  Base Framing Protocol////  0                   1                   2                   3//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1// +-+-+-+-+-------+-+-------------+-------------------------------+// |F|R|R|R| opcode|M| Payload len |    Extended payload length    |// |I|S|S|S|  (4)  |A|     (7)     |             (16/64)           |// |N|V|V|V|       |S|             |   (if payload len==126/127)   |// | |1|2|3|       |K|             |                               |// +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +// |     Extended payload length continued, if payload len == 127  |// + - - - - - - - - - - - - - - - +-------------------------------+// |                               |Masking-key, if MASK set to 1  |// +-------------------------------+-------------------------------+// | Masking-key (continued)       |          Payload Data         |// +-------------------------------- - - - - - - - - - - - - - - - +// :                     Payload Data continued ...                :// + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// |                     Payload Data continued ...                |// +---------------------------------------------------------------+readyStateValues getReadyState() const {return readyState;}void initSize(int sendsize, int recvsize);void pollRecv(int timeout);void sendPing();void send(const char *message);void sendBinary(uint8_t *data, int len);void close();int  connect(const std::string& url);void dispatch(callback_message_recv callable);
protected:void pollSend(int timeout);
};

实现cpp


#include "wsclient.h"
#include <vector>
#include <string>socket_t hostname_connect(const std::string& hostname, int port) {struct addrinfo hints;struct addrinfo *result;struct addrinfo *p;int ret;socket_t sockfd = INVALID_SOCKET;char sport[16];memset(&hints, 0, sizeof(hints));hints.ai_family = AF_UNSPEC;hints.ai_socktype = SOCK_STREAM;snprintf(sport, 16, "%d", port);if ((ret = getaddrinfo(hostname.c_str(), sport, &hints, &result)) != 0){printf("error get addrinfo\n");//fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(ret));return -1;}for (p = result; p != NULL; p = p->ai_next){sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol);if (sockfd == INVALID_SOCKET) { continue; }if (connect(sockfd, p->ai_addr, (int)p->ai_addrlen) != SOCKET_ERROR) {break;}closesocket(sockfd);sockfd = INVALID_SOCKET;}freeaddrinfo(result);return sockfd;
}void WebSocket::initSize(int sendsize, int recvsize)
{if (sendsize == 0)sendsize = 1024 * 1024 * 2;if (recvsize == 0)recvsize = 1024 * 1024 * 2;rxbuf.reserve(recvsize);}void WebSocket::pollSend(int timeout)
{if (readyState == CLOSED) {if (timeout > 0) {timeval tv = { timeout / 1000, (timeout % 1000) * 1000 };select(0, NULL, NULL, NULL, &tv);}return;}if (timeout != 0) {//fd_set rfds;fd_set wfds;timeval tv = { timeout / 1000, (timeout % 1000) * 1000 };//FD_ZERO(&rfds);FD_ZERO(&wfds);//FD_SET(sockfd, &rfds);if (txbuf.size()) { FD_SET(sockfd, &wfds); }select(sockfd + 1, NULL, &wfds, 0, timeout > 0 ? &tv : 0);}while (txbuf.size()) {int ret = ::send(sockfd, (char*)&txbuf[0], txbuf.size(), 0);if (ret < 0 && (socketerrno == SOCKET_EWOULDBLOCK || socketerrno == SOCKET_EAGAIN_EINPROGRESS)) {break;}else if (ret <= 0) {closesocket(sockfd);readyState = CLOSED;fputs(ret < 0 ? "Connection error!\n" : "Connection closed!\n", stderr);break;}else {txbuf.erase(txbuf.begin(), txbuf.begin() + ret);}}if (!txbuf.size() && readyState == CLOSING) {closesocket(sockfd);readyState = CLOSED;}
}void WebSocket::pollRecv(int timeout)
{if (readyState == CLOSED) {if (timeout > 0) {timeval tv = { timeout / 1000, (timeout % 1000) * 1000 };select(0, NULL, NULL, NULL, &tv);}return;}if (timeout > 0) {fd_set rfds;//fd_set wfds;timeval tv = { timeout / 1000, (timeout % 1000) * 1000 };FD_ZERO(&rfds);FD_SET(sockfd, &rfds);select(sockfd + 1, &rfds, NULL, 0, timeout > 0 ? &tv : 0);}while (true) {// FD_ISSET(0, &rfds) will be trueint N = rxbuf.size();ssize_t ret;//钱波 64K 一个IP包长rxbuf.resize(N + 64000);ret = recv(sockfd, (char*)&rxbuf[0] + N, 64000, 0);if (false) {}else if (ret < 0 && (socketerrno == SOCKET_EWOULDBLOCK || socketerrno == SOCKET_EAGAIN_EINPROGRESS)) {rxbuf.resize(N);break;}else if (ret <= 0) {rxbuf.resize(N);closesocket(sockfd);readyState = CLOSED;fputs(ret < 0 ? "Connection error!\n" : "Connection closed!\n", stderr);break;}else {rxbuf.resize(N + ret);}}
}void WebSocket::dispatch(callback_message_recv callable) {// TODO: consider acquiring a lock on rxbuf...while (true) {wsheader_type ws;if (rxbuf.size() < 2) { return; /* Need at least 2 */ }const uint8_t * data = (uint8_t *)&rxbuf[0]; // peek, but don't consumews.fin = (data[0] & 0x80) == 0x80;ws.opcode = (wsheader_type::opcode_type) (data[0] & 0x0f);//RFC 6455 文档 接收服务器数据 maks应该为false 钱波ws.mask = (data[1] & 0x80) == 0x80;ws.N0 = (data[1] & 0x7f);ws.header_size += 2;switch (ws.N0){case 126:ws.header_size += 2;break;case 127:ws.header_size += 8;break;default://break;}if (ws.mask)ws.header_size += 4;//ws.header_size = 2 + (ws.N0 == 126 ? 2 : 0) + (ws.N0 == 127 ? 8 : 0) + (ws.mask ? 4 : 0);if (rxbuf.size() < ws.header_size){ return; /* Need: ws.header_size - rxbuf.size() */ }int i = 0;if (ws.N0 < 126) {ws.N = ws.N0;i = 2;}else if (ws.N0 == 126) {ws.N = 0;ws.N |= ((uint64_t)data[2]) << 8;ws.N |= ((uint64_t)data[3]) << 0;i = 4;}else if (ws.N0 == 127) {ws.N = 0;ws.N |= ((uint64_t)data[2]) << 56;ws.N |= ((uint64_t)data[3]) << 48;ws.N |= ((uint64_t)data[4]) << 40;ws.N |= ((uint64_t)data[5]) << 32;ws.N |= ((uint64_t)data[6]) << 24;ws.N |= ((uint64_t)data[7]) << 16;ws.N |= ((uint64_t)data[8]) << 8;ws.N |= ((uint64_t)data[9]) << 0;i = 10;}if (ws.mask) {ws.masking_key[0] = ((uint8_t)data[i + 0]) << 0;ws.masking_key[1] = ((uint8_t)data[i + 1]) << 0;ws.masking_key[2] = ((uint8_t)data[i + 2]) << 0;ws.masking_key[3] = ((uint8_t)data[i + 3]) << 0;}else {ws.masking_key[0] = 0;ws.masking_key[1] = 0;ws.masking_key[2] = 0;ws.masking_key[3] = 0;}if (rxbuf.size() < ws.header_size + ws.N) { return; /* Need: ws.header_size+ws.N - rxbuf.size() */ }// We got a whole message, now do something with it:if (false) {}else if (ws.opcode == wsheader_type::TEXT_FRAME|| ws.opcode == wsheader_type::BINARY_FRAME|| ws.opcode == wsheader_type::CONTINUATION) {if (ws.mask) { for (size_t i = 0; i != ws.N; ++i) { rxbuf[i + ws.header_size] ^= ws.masking_key[i & 0x3]; } }//          receivedData.insert(receivedData.end(), rxbuf.begin()+ws.header_size, rxbuf.begin()+ws.header_size+(size_t)ws.N);// just feedif (ws.fin) {//    printf("the data len is %d\n", (size_t)ws.N);const char * data = (const char*)&rxbuf[ws.header_size];int len = (int)ws.N;callable(NULL, data, len, ws.opcode);}}else if (ws.opcode == wsheader_type::PING) {if (ws.mask) { for (size_t i = 0; i != ws.N; ++i) { rxbuf[i + ws.header_size] ^= ws.masking_key[i & 0x3]; } }std::string data(rxbuf.begin() + ws.header_size, rxbuf.begin() + ws.header_size + (size_t)ws.N);//sendData(wsheader_type::TEXT_FRAME, str_len, (uint8_t*)message, (uint8_t*)(message + str_len));//uint8_t* data_ = (uint8_t*)data.c_str();//uint8_t* end = data_ + data.size();sendData(wsheader_type::PONG, data.size(), data.begin(), data.end());}else if (ws.opcode == wsheader_type::PONG) {}else if (ws.opcode == wsheader_type::CLOSE) { close(); }else { fprintf(stderr, "ERROR: Got unexpected WebSocket message.\n"); close(); }rxbuf.erase(rxbuf.begin(), rxbuf.begin() + ws.header_size + (size_t)ws.N);}
}void WebSocket::sendPing() {std::string empty;sendData(wsheader_type::PING, empty.size(), empty.begin(), empty.end());
}void WebSocket::send(const char * message) {size_t str_len = strlen(message);sendData(wsheader_type::TEXT_FRAME, str_len, message, message+str_len);//pollSend(10);
}void WebSocket::sendBinary(uint8_t *data, int len)
{sendData(wsheader_type::BINARY_FRAME, len, data, data + len);//pollSend(10);
}
template <class Iterator>
void WebSocket::sendData(wsheader_type::opcode_type type, uint64_t message_size, Iterator message_begin, Iterator message_end) {// TODO:// Masking key should (must) be derived from a high quality random// number generator, to mitigate attacks on non-WebSocket friendly// middleware:const uint8_t masking_key[4] = { 0x12, 0x34, 0x56, 0x78 };// TODO: consider acquiring a lock on txbuf...if (readyState == CLOSING || readyState == CLOSED) { return; }std::vector<uint8_t> header;header.assign(2 + (message_size >= 126 ? 2 : 0) + (message_size >= 65536 ? 6 : 0) + (useMask ? 4 : 0), 0);header[0] = 0x80 | type;if (false) {}else if (message_size < 126) {header[1] = (message_size & 0xff) | (useMask ? 0x80 : 0);if (useMask) {header[2] = masking_key[0];header[3] = masking_key[1];header[4] = masking_key[2];header[5] = masking_key[3];}}else if (message_size < 65536) {header[1] = 126 | (useMask ? 0x80 : 0);header[2] = (message_size >> 8) & 0xff;header[3] = (message_size >> 0) & 0xff;if (useMask) {header[4] = masking_key[0];header[5] = masking_key[1];header[6] = masking_key[2];header[7] = masking_key[3];}}else { // TODO: run coverage testing hereheader[1] = 127 | (useMask ? 0x80 : 0);header[2] = (message_size >> 56) & 0xff;header[3] = (message_size >> 48) & 0xff;header[4] = (message_size >> 40) & 0xff;header[5] = (message_size >> 32) & 0xff;header[6] = (message_size >> 24) & 0xff;header[7] = (message_size >> 16) & 0xff;header[8] = (message_size >> 8) & 0xff;header[9] = (message_size >> 0) & 0xff;if (useMask) {header[10] = masking_key[0];header[11] = masking_key[1];header[12] = masking_key[2];header[13] = masking_key[3];}}// N.B. - txbuf will keep growing until it can be transmitted over the socket:txbuf.insert(txbuf.end(), header.begin(), header.end());txbuf.insert(txbuf.end(), message_begin, message_end);if (useMask) {//钱波 掩码操作,RFC 6455 客户端向服务端发送数据都需要掩码操作for (size_t i = 0; i != message_size; ++i) { *(txbuf.end() - message_size + i) ^= masking_key[i & 0x3]; }}pollSend(10);
}void WebSocket::close() {if (readyState == CLOSING || readyState == CLOSED) { return; }readyState = CLOSING;uint8_t closeFrame[6] = { 0x88, 0x80, 0x00, 0x00, 0x00, 0x00 }; // last 4 bytes are a masking keystd::vector<uint8_t> header(closeFrame, closeFrame + 6);txbuf.insert(txbuf.end(), header.begin(), header.end());::closesocket(sockfd);readyState = CLOSED;//close(sockfd);
}int WebSocket::connect(const std::string& url) {bool useMask = true;std::string origin = "";char host[128];int port;char path[128];if (url.size() >= 128) {fprintf(stderr, "ERROR: url size limit exceeded: %s\n", url.c_str());return -1;}if (origin.size() >= 200) {fprintf(stderr, "ERROR: origin size limit exceeded: %s\n", origin.c_str());return -1;}if (false) {}else if (sscanf(url.c_str(), "ws://%[^:/]:%d/%s", host, &port, path) == 3) {}else if (sscanf(url.c_str(), "ws://%[^:/]/%s", host, path) == 2) {port = 80;}else if (sscanf(url.c_str(), "ws://%[^:/]:%d", host, &port) == 2) {path[0] = '\0';}else if (sscanf(url.c_str(), "ws://%[^:/]", host) == 1) {port = 80;path[0] = '\0';}else {fprintf(stderr, "ERROR: Could not parse WebSocket url: %s\n", url.c_str());return -1;}fprintf(stderr, "wsclient: connecting: host=%s port=%d path=/%s\n", host, port, path);sockfd = hostname_connect(host, port);if (sockfd == INVALID_SOCKET) {fprintf(stderr, "Unable to connect to %s:%d\n", host, port);return -1;}{// XXX: this should be done non-blocking,char line[256];int status;int i;snprintf(line, 256, "GET /%s HTTP/1.1\r\n", path); ::send(sockfd, line, strlen(line), 0);if (port == 80) {snprintf(line, 256, "Host: %s\r\n", host); ::send(sockfd, line, strlen(line), 0);}else {snprintf(line, 256, "Host: %s:%d\r\n", host, port); ::send(sockfd, line, strlen(line), 0);}snprintf(line, 256, "Upgrade: websocket\r\n"); ::send(sockfd, line, strlen(line), 0);snprintf(line, 256, "Connection: Upgrade\r\n"); ::send(sockfd, line, strlen(line), 0);if (!origin.empty()) {snprintf(line, 256, "Origin: %s\r\n", origin.c_str()); ::send(sockfd, line, strlen(line), 0);}snprintf(line, 256, "Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==\r\n"); ::send(sockfd, line, strlen(line), 0);snprintf(line, 256, "Sec-WebSocket-Version: 13\r\n"); ::send(sockfd, line, strlen(line), 0);snprintf(line, 256, "\r\n"); ::send(sockfd, line, strlen(line), 0);for (i = 0; i < 2 || (i < 255 && line[i - 2] != '\r' && line[i - 1] != '\n'); ++i) { if (recv(sockfd, line + i, 1, 0) == 0) { return NULL; } }line[i] = 0;if (i == 255) { fprintf(stderr, "ERROR: Got invalid status line connecting to: %s\n", url.c_str()); return NULL; }if (sscanf(line, "HTTP/1.1 %d", &status) != 1 || status != 101) { fprintf(stderr, "ERROR: Got bad status connecting to %s: %s", url.c_str(), line); return NULL; }// TODO: verify response headers,while (true) {for (i = 0; i < 2 || (i < 255 && line[i - 2] != '\r' && line[i - 1] != '\n'); ++i) { if (recv(sockfd, line + i, 1, 0) == 0) { return NULL; } }if (line[0] == '\r' && line[1] == '\n') { break; }}}int flag = 1;setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, sizeof(flag)); // Disable Nagle's algorithm
#ifdef _WIN32u_long on = 1;ioctlsocket(sockfd, FIONBIO, &on);
#elsefcntl(sockfd, F_SETFL, O_NONBLOCK);
#endiffprintf(stderr, "Connected to: %s\n", url.c_str());readyState = OPEN;return 0;
}

调用

封装一个class,实现线程

class ws_class //:public TThreadRunable
{thread _thread;std::mutex _mutex;std::condition_variable _cond;WebSocket _ws;int _stop = 0;string _url;
public:static int InitSock(){#ifdef _WIN32INT rc;WSADATA wsaData;rc = WSAStartup(MAKEWORD(2, 2), &wsaData);if (rc) {printf("WSAStartup Failed.\n");return -1;}
#endifreturn 0;}static void UnInitSock(){WSACleanup();}ws_class(){}~ws_class(){_ws.close();}callback_message_recv _recv = NULL;
public:void set_url(const char * url){_url = url;}int connect(){if (_url.empty())return -1;return _ws.connect(_url);}void Start(callback_message_recv recv){_ws.initSize(0, 0);_recv = recv;_thread = std::thread(std::bind(&ws_class::Run, this));//return 0;}void Join(){if (_thread.joinable())_thread.join();}void send(char * str){if (str != NULL){if (_ws.getReadyState() != CLOSED){_ws.send(str);//_ws.pollSend(10);}}}void sendBinary(uint8_t *data, int len){if (_ws.getReadyState() != CLOSED){_ws.sendBinary(data, len);//_ws.pollSend(0);}}void Stop(){_stop = 1;}void Run(){while (_stop == 0) {//WebSocket::pointer wsp = &*ws; // <-- because a unique_ptr cannot be copied into a lambdaif (_stop == 1)break;if (_ws.getReadyState() == CLOSED){//断线重连if (connect() != 0){for (int i = 0; i < 20; i++){std::this_thread::sleep_for(std::chrono::milliseconds(100));if (_stop == 1)break;}}}else{_ws.pollRecv(10);_ws.dispatch(_recv);//_ws.dispatch([](void * pUser, const char * message, int len, int type) {//});}//std::this_thread::sleep_for(std::chrono::milliseconds(10));}_ws.close();//std::cout << "server exit" << endl;_stop = 1;}void WaitForSignal(){std::unique_lock<std::mutex> ul(_mutex);_cond.wait(ul);}void Notify(){_cond.notify_one();}
};

总结

实现websocket服务端和客户端并不是很难,只是很多知识点,本次的实现还有很多不理想之处,会在应用中修正。

c++ websocket 客户端相关推荐

  1. netty websocket客户端_Websocket操作字节序 之 服务端

    Websocket在JavaScript中操作字节序 之 客户端 在上一篇文章中,把页面的websocket编码写好了,那么服务端又该如何实现呢?由于该文是在上上篇demo中修改的,所以不全的代码还请 ...

  2. 火币网行情获取的websocket客户端

    从验证结果看应该是网络关闭了,不过程序写的不错,可以作为其它websocket客户端的测试程序 # !/usr/bin/env python # -*- coding: utf-8 -*- # aut ...

  3. c++ websocket客户端_你要的websocket都在这,收好不谢~~~

    此号已经沉寂多时,似乎已经忘了上一次更新是什么时候了!这一次重拾旧爱,希望能够一直保持下去,坚持写作,快乐你我他 今天的主题是websocket,相信搞研发的兄弟对websocket并不陌生,都202 ...

  4. webscoket绑定php uid,Think-Swoole之WebSocket客户端消息解析与使用SocketIO处理用户UID与fd关联...

    WebSocket 客户端消息的解析 前面我们演示了当客户端连接服务端,会触发连接事件,事件中我们要求返回当前客户端的 fd.当客户端发送消息给服务端,服务端会根据我们的规则将消息发送给指定 fd 的 ...

  5. 基于Boost::beast模块的异步WebSocket客户端

    基于Boost::beast模块的异步WebSocket客户端 实现功能 C++实现代码 实现功能 基于Boost::beast模块的异步WebSocket客户端 C++实现代码 #include & ...

  6. 基于Boost::beast模块的协程WebSocket客户端

    基于Boost::beast模块的协程WebSocket客户端 实现功能 C++实现代码 实现功能 基于Boost::beast模块的协程WebSocket客户端 C++实现代码 #include & ...

  7. 基于Boost::beast模块的同步WebSocket客户端

    Boost:基于Boost::beast模块的同步WebSocket客户端 实现功能 C++实现代码 实现功能 基于Boost::beast模块的同步WebSocket客户端 C++实现代码 #inc ...

  8. netty系列之:使用netty搭建websocket客户端

    文章目录 简介 浏览器客户端 netty对websocket客户端的支持 WebSocketClientHandshaker WebSocketClientCompressionHandler net ...

  9. c++ websocket客户端_python测试开发django81.dwebsocket实现websocket

    前言 HTTP 协议有一个缺陷:通信只能由客户端发起,做不到服务器主动向客户端推送信息. WebSocket 协议它的最大特点就是,服务器可以主动向客户端推送信息,客户端也可以主动向服务器发送信息,是 ...

  10. python3.6 websocket异步高并发_在Python3.6上的websocket客户端中侦听传入消息时出现问题...

    我正在尝试使用websockets包在Python上构建一个websockets客户端:Websockets 4.0 API 我使用这种方式而不是示例代码,因为我想创建一个websocket客户机类对 ...

最新文章

  1. 笔记 | 吴恩达Coursera Deep Learning学习笔记
  2. Tomcat Server.xml 标签详解 .
  3. 怎么查看kudu的版本_apache版本kudu kudu-impala安装方法
  4. 无人机内嵌计算机Manifold 2可部署容器化应用
  5. [转]IIS的各种身份验证详细测试
  6. 人工神经网络简介和单层网络实现AND运算--AForge.NET框架的使用(五)
  7. 代码块_Dynamo?Get 7.1 什么是代码块
  8. 关于sybase数据库的连接
  9. 《微微一笑很倾城》中肖奈大神说的平方根倒数速算法是什么鬼?三十分钟理解!
  10. 华为云服务器怎么更改系统版本,华为云服务器怎么更改系统版本
  11. 爬虫初识(爬取dytt电影列表及下载地址)
  12. layout_marginTop=-3dp导致内容被遮挡的问题处理
  13. [玩转北京] 北京最值得你一看的博物馆大全
  14. 计算机学院篮球队介绍,2018年校级篮球联赛计算机与信息学院篮球队专访
  15. 机器学习系列文章-决策树
  16. sublime text 编译时提示[WinError 2] 系统找不到指定的文件。
  17. 2010新浪笔试---数据挖掘
  18. CREO教程——1 初始配置
  19. Linux中chown和chmod的用法
  20. 为什么要建立计算机网络体系结构标准,请问什么是网络体系结构?为什么要定义网络体系结构?...

热门文章

  1. Azure Cosmos DB(Azure 宇宙数据库)--地球已无法阻止微软玩数据库了
  2. mysql 两张大表关联_MySQL的DropTable影响分析和最佳实践
  3. 马斯克又一语双关 引用猫王金曲威胁直接向推特股东发要约收购?
  4. 长远锂科:拟发行可转债募资不超32.5亿元
  5. 知乎首次举办上星晚会 定档除夕前夜
  6. 百度Apollo赋能的威马W6,自主泊车体验如何?
  7. 沃尔沃召回部分进口及国产车 共计131591辆
  8. 原价19万的美系插混,2年后落地只要11万~15万,微蓝6 PHEV为啥这么惨
  9. 马斯克:特斯拉Model S Plaid交付时间将推迟至6月10日
  10. 小米11系列备货量多,得益于骁龙888首发独占期