This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <assert.h> | |
int main() | |
{ | |
std::vector<int> vec_int; | |
vec_int.push_back(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <netdb.h> | |
#include <netinet/in.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#define BUFFER_SIZE 128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpRequest::HttpRequest (const std::string& url) | |
:attributeCount_(0), | |
url_(url), | |
hostname_(url.substr(0, url.find_first_of('/'))), | |
path_(url.substr(url.find_first_of('/'))), | |
resolver_(io_service_), | |
socket_(io_service_) | |
{ | |
//check if a port is in the hostname. | |
size_t index = hostname_.find_first_of(':'); |
NewerOlder