RyanHub – file viewer
filename: include/networking.h
branch: main
back to repo
#ifndef NETWORKING_H
#define NETWORKING_H

#include <WS2tcpip.h>
#include <GLFW/glfw3.h>
#include <string>
#include <iostream>

using std::cout;
using std::endl;
using std::string;

class Network {
public:
	string printLocalIPAddress();
	SOCKET serverSetup();
	SOCKET clientSetup(string serverIP);
	bool sendData(SOCKET sock, char* buff, size_t size);
	bool recvData(SOCKET sock, char* buff, size_t bufferSize, size_t& bytesReceived);
};

#endif