IXWebSocket/ixwebsocket/IXSocketConnect.h

33 lines
766 B
C
Raw Normal View History

/*
* IXSocketConnect.h
* Author: Benjamin Sergeant
* Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
*/
#pragma once
2018-12-14 16:28:11 -08:00
#include "IXCancellationRequest.h"
#include <string>
struct addrinfo;
namespace ix
{
class SocketConnect {
public:
static int connect(const std::string& hostname,
int port,
std::string& errMsg,
2018-12-14 16:28:11 -08:00
const CancellationRequest& isCancellationRequested);
2018-12-29 23:15:27 -08:00
static void configure(int sockfd);
2018-12-14 16:28:11 -08:00
private:
static int connectToAddress(const struct addrinfo *address,
std::string& errMsg,
const CancellationRequest& isCancellationRequested);
};
}