http upgrade and connections use non blocking sockets

This commit is contained in:
Benjamin Sergeant
2018-12-09 14:07:40 -08:00
parent 49bf8bd830
commit 62528e6a0b
9 changed files with 255 additions and 110 deletions

View File

@ -0,0 +1,28 @@
/*
* IXSocketConnect.h
* Author: Benjamin Sergeant
* Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
*/
#pragma once
#include <string>
struct addrinfo;
namespace ix
{
class SocketConnect {
public:
static int connect(const std::string& hostname,
int port,
std::string& errMsg);
static bool connectToAddress(const struct addrinfo *address,
int& sockfd,
std::string& errMsg);
static void configure(int sockfd);
};
}