Forum

> > Off Topic > C/C++ Winsock help
Forums overviewOff Topic overviewLog in to reply

English C/C++ Winsock help

6 replies
To the start Previous 1 Next To the start

old Re: C/C++ Winsock help

oxytamine
User Off Offline

Quote
Wait! You also have to make a call to WSAStartup() before doing anything else with the sockets library. The code to do that looks something like this.
1
2
3
4
5
6
7
8
9
10
11
12
#include <winsock.h>
{
WSADATA wsaData;   // If this doesn't work
// WSAData wsaData; // then try this instead.

// MAKEWORD(1,1) for Winsock 1.1, MAKEWORD(2,0) for Winsock 2.0:

    if (WSAStartup(MAKEWORD(1,1), &wsaData) != 0) 
        {
            fprintf(stderr, "WSAStartup failed.\n");
            exit(1);
        }

old Re: C/C++ Winsock help

KimKat
GAME BANNED Off Offline

Quote
Quote
What is a socket? (theory).
Spoiler >
That's some pretty interesting stuff about WinSock. But what's FIFO? I almost misinterpreted it as FIFA (as in soccer/football), lol.

old Re: C/C++ Winsock help

archmage
User Off Offline

Quote
Thanks I think I understand it, but would someone post source of a simple server and client?

@KimKat
FIFO is the acronym of "first in, first out".
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview