Sockets

winsock, or BSD sockets
jwatte's picture

HTTP-GET source code download

If you've ever wanted to read web pages into your C or C++ program, then this code is for you. It's the smallest possible code that will let you read arbitrary web URLs into your own program. It does NOT have any kind of interesting features, and is not coded to be fully standards compliant, but:

  • it comes with source
  • it's very small
  • it works
jwatte's picture

Extracting packets from a TCP stream

When you send packets over TCP, you have to precede them with a byte count, because TCP just delivers a stream of bytes, with no particular block size. If you don't delimit your packets somehow, they will run into each other, and you won't be able to tell where one ends and the next one starts.

jwatte's picture

Etwork Quick Start

his book will get you started using etwork without too much pain.

Necessary pre-requisites include:

  • Knowledge of C++ programming
  • Microsoft Visual Studio 2005 (or Visual C++ Express 2005 with the Platform SDK addition)
  • The latest version of etwork
jwatte's picture

A simple buffer class for network receive

When you develop socket receive code, you will soon run into the problem that TCP will send data in arbitrary blocks. Even if you send a given string in a single call to send(), that string may arrive as two separate recv() calls -- or may arrive glued together with some previous or following data. Or both.
Syndicate content