Giter VIP home page Giter VIP logo

c_http_learn's Introduction

socket学习

使用socket编写的一个http请求demo, 只实现了最基础的GET请求

关于Socket

Windows Sockets API (WSA), 简短记为Winsock, 是Windows的TCP/IP网络编程接口(API)。其函数名称兼容于Berkeley套接字API。实际上,Winsock的实现库(winsock.dll)使用的是长名字。

Winsock是一种能使Windows程序通过任意网络传输协议发送数据的API。Winsock中有几个只支持TCP/IP协议的函数(例如gethostbyaddr()),但是在Winsock 2中新增了所有这些函数的通用版本,以允许开发者使用其它的传输协议。

HTTP协议

编译

目前只支持windows平台

使用cmake进行编译

首先需要配置好cmake需要的环境变量

如何使用vscode可以按照相关插件进行自动配置

cmake build  #需要配置好build目录(交给插件完成)

# 进入build目录
cd build
# 编译
make
# 运行
http.exe http://www.baidu.com/

LICENSE

mit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.