Several minor bugfixes and improvements throughout.
This commit is contained in:
parent
cac5dcc9a1
commit
f3b0b36e2b
5 changed files with 125 additions and 54 deletions
|
@ -215,6 +215,8 @@ std::string Socket::Connection::getError(){return strerror(errno);}
|
|||
/// \param address String containing the location of the Unix socket to connect to.
|
||||
/// \param nonblock Whether the socket should be nonblocking. False by default.
|
||||
Socket::Connection::Connection(std::string address, bool nonblock){
|
||||
pipes[0] = -1;
|
||||
pipes[1] = -1;
|
||||
sock = socket(PF_UNIX, SOCK_STREAM, 0);
|
||||
if (sock < 0){
|
||||
#if DEBUG >= 1
|
||||
|
@ -250,6 +252,8 @@ Socket::Connection::Connection(std::string address, bool nonblock){
|
|||
/// \param port String containing the port to connect to.
|
||||
/// \param nonblock Whether the socket should be nonblocking.
|
||||
Socket::Connection::Connection(std::string host, int port, bool nonblock){
|
||||
pipes[0] = -1;
|
||||
pipes[1] = -1;
|
||||
struct addrinfo *result, *rp, hints;
|
||||
Error = false;
|
||||
Blocking = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue