CSE691/891 - Internet Programming Summer 2001
prev next

Sockets Interface

This page we look at the WinSock Application Programmer's Interface (API). This is a set of functions, written in C and accessible to either C or C++, that provide connectivity to any machine connected to your local network or accessible through the internet, e.g., has a known IP address.

You access the winsock API by inserting, at the beginning of your code, the statement:

#include <winsock2.h>
and adding wsock32.lib to the files to be linked with your application.

The winsock API conforms to a sockets standard, functional on both UNIX and Windows platforms, so a sockets-based program written for a UNIX platform should be able to communicate with a sockets-based program running on a Windows platform.

Win32 Sockets API

prev next