原创 編譯完成的libevent進行測試

注意使用時添加windows的網絡庫 #include<iostream> #include "event2/event.h" #include "event2/listener.h" void cb(struct evc

原创 編譯libevent

本文記錄在win10編譯libevent的過程 1.編譯前準備zlib,openssl zlib網址 http://www.zlib.net/  下載源碼解壓縮 打開vs的dos窗口 32位選擇32位窗口這裏選擇64位,cd 到解壓後的

原创 libevent 配置項的粗略記錄

/*主要演示libevent的配置選項*/ #include<iostream> #include "event2/event.h" #include <event2/thread.h> #include<event2/list

原创 libevent在windows中設置iocp和線程池

#include <event2/event.h> #include <event2/thread.h> #include<event2/listener.h> #ifndef _WIN32 #include <signal.h

原创 ffmpeg YUV420P保存H264文件

#include <iostream> #include <thread> #include <stdio.h> extern "C" { #include "libavutil/opt.h" #include "libavut

原创 c++11標準庫學習 atomic

// c++11 標準庫使用atomic 自旋鎖(只要有鎖阻塞等待的鎖) #include <iostream> #include <atomic> #include <thread>

原创 c++ 網絡編程最簡單 hello world

linux c++下的最簡單的服務端hello world #include <iostream> #include <cstdio> #include <unistd.h> #include <string> #include

原创 ffmpeg保存YUV

#pragma comment(lib,"avformat.lib") #pragma comment(lib,"avcodec.lib") #pragma comment(lib,"avutil.lib") #pragma co

原创 libevent的簡單收發demo超時時間爲10秒

libevent的簡單收發demo超時時間爲10秒 #include <iostream> #include <event2/event.h> #ifndef _WIN32 #include <signal.h> #else #

原创 一個JavaScript 程序

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鳥教程(runoob.com)</title> <script> function displayDate(){

原创 js輸出語句

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鳥教程(runoob.com)</title> </head> <body> <h1>我的第一個 We

原创 ffmpeg視頻轉碼示例

extern "C" { #include <libavformat/avformat.h> #include <libswscale/swscale.h> } #pragma comment(lib,"avformat.lib")

原创 ffmpeg進行轉封裝

#if 0 //2018-12-19 ffmpeg進行轉封裝不進行轉碼 //ffmpeg庫4.0.2 #include<iostream> #include<thread> extern "C" { #include <libavf

原创 c++ 中隊列的使用

#include<iostream> #include<queue> using namespace std; int main() { queue<char> que; const char* w = "hello world"

原创 string基本操作:刪除制定位置,截取,替換,查找字符串位置,插入字符串

#include<iostream> #include<string> using namespace std; int main() { //////////////////////////////////////////////