OpenTTD Source: src/network/core/address.cpp File Reference

OpenTTD Source 1.11.0-RC1

Functions
address.cpp File Reference
`#include "../../stdafx.h"`
`#include "address.h"`
`#include "../../debug.h"`
`#include "../../safeguards.h"`

Go to the source code of this file.

## Functions
static SOCKET | ResolveLoopProc (addrinfo *runp)
| Helper function to resolve without opening a socket. More...
static SOCKET | ConnectLoopProc (addrinfo *runp)
| Helper function to resolve a connected socket. More...
static SOCKET | ListenLoopProc (addrinfo *runp)
| Helper function to resolve a listening. More...

## Detailed Description

Implementation of the address.

Definition in file address.cpp.

## Function Documentation

## ◆ ConnectLoopProc()

static SOCKET ConnectLoopProc | ( | addrinfo * | runp | ) |
| static

Helper function to resolve a connected socket.

Parameters

  runp | information about the socket to try not

Returns
  the opened socket or INVALID_SOCKET

Definition at line 299 of file address.cpp.

References NetworkAddress::AddressFamilyAsString(), DEBUG, NetworkAddress::GetAddressAsString(), lastof, NETWORK_HOSTNAME_LENGTH, SetNoDelay(), SetNonBlocking(), and NetworkAddress::SocketTypeAsString().

Referenced by NetworkAddress::Connect().

## ◆ ListenLoopProc()

static SOCKET ListenLoopProc | ( | addrinfo * | runp | ) |
| static

Helper function to resolve a listening.

Parameters

  runp | information about the socket to try not

Returns
  the opened socket or INVALID_SOCKET

Definition at line 352 of file address.cpp.

References NetworkAddress::AddressFamilyAsString(), DEBUG, NetworkAddress::GetAddressAsString(), lastof, NETWORK_HOSTNAME_LENGTH, SetNoDelay(), SetNonBlocking(), and NetworkAddress::SocketTypeAsString().

Referenced by NetworkAddress::Listen().

## ◆ ResolveLoopProc()

static SOCKET ResolveLoopProc | ( | addrinfo * | runp | ) |
| static

Helper function to resolve without opening a socket.

Parameters

  runp | information about the socket to try not

Returns
  the opened socket or INVALID_SOCKET

Definition at line 113 of file address.cpp.

Referenced by NetworkAddress::GetAddress(), NetworkAddress::IsFamily(), and NetworkAddress::Resolve().