forgot to commit this
This commit is contained in:
parent
b9fc0253ff
commit
698a12ddb4
2 changed files with 39 additions and 10 deletions
35
server/src/sock/tcpsock_bsd.cpp
Normal file
35
server/src/sock/tcpsock_bsd.cpp
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include "tcpsock.hpp"
|
||||||
|
#ifndef _WIN32
|
||||||
|
|
||||||
|
/****************************/
|
||||||
|
/* BEGIN TCPCLIENT CODE */
|
||||||
|
/****************************/
|
||||||
|
|
||||||
|
sosc::TcpClient::TcpClient() {
|
||||||
|
this->sock_open = false;
|
||||||
|
this->addr_len = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool sosc::TcpClient::Init(std::string host, std::uint16_t port) {
|
||||||
|
if(this->sock_open)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
struct addrinfo hints, *result, *ptr;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************/
|
||||||
|
/* END TCPCLIENT CODE */
|
||||||
|
/****************************/
|
||||||
|
/* BEGIN TCPSERVER CODE */
|
||||||
|
/****************************/
|
||||||
|
|
||||||
|
sosc::TcpServer::TcpServer() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************/
|
||||||
|
/* END TCPSERVER CODE */
|
||||||
|
/****************************/
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,10 +1,10 @@
|
||||||
#include "tcpsock.hpp"
|
#include "tcpsock.hpp"
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
/****************************/
|
/****************************/
|
||||||
/* BEGIN TCPCLIENT CODE */
|
/* BEGIN TCPCLIENT CODE */
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
sosc::TcpClient::TcpClient() {
|
sosc::TcpClient::TcpClient() {
|
||||||
this->sock_open = false;
|
this->sock_open = false;
|
||||||
this->addr_len = -1;
|
this->addr_len = -1;
|
||||||
|
@ -15,27 +15,21 @@ bool sosc::TcpClient::Init(std::string host, std::uint16_t port) {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
struct addrinfo hints, *result, *ptr;
|
struct addrinfo hints, *result, *ptr;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************/
|
/****************************/
|
||||||
/* END TCPCLIENT CODE */
|
/* END TCPCLIENT CODE */
|
||||||
/****************************/
|
/****************************/
|
||||||
/* BEGIN TCPSERVER CODE */
|
/* BEGIN TCPSERVER CODE */
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
sosc::TcpServer::TcpServer() {
|
sosc::TcpServer::TcpServer() {
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************/
|
/****************************/
|
||||||
/* END TCPSERVER CODE */
|
/* END TCPSERVER CODE */
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue