Sockets.hpp File Reference

Interface of the three socket classes, MessageSocket, CommSocket and ListenerSocket. More...

Go to the source code of this file.


Classes

class  Gosu::MessageSocket
 Wraps an UDP socket. More...
class  Gosu::CommSocket
 Wraps a TCP socket that is used for one part of bi-directional communication. More...
class  Gosu::ListenerSocket
 Wraps a TCP socket that waits on a specific port and can create CommSocket instances via its onConnection event. More...

Namespaces

namespace  Gosu
 The library's main namespace.

Typedefs

typedef boost::uint32_t Gosu::SocketAddress
 Addresses are returned from and given to Gosu functions in host byte order.
typedef boost::uint16_t Gosu::SocketPort
 Ports are returned from and given to Gosu functions in host byte order.

Enumerations

enum  Gosu::CommMode { Gosu::cmRaw, Gosu::cmManaged }
 Defines the way in which data is collected until the onReceive event is called for CommSockets. More...

Functions

SocketAddress Gosu::stringToAddress (const std::string &s)
 Tries to convert a dotted IP4 string into an address suitable for socket functions.
std::string Gosu::addressToString (SocketAddress address)
 Converts an address into a dotted IP4 string.

Variables

const SocketPort Gosu::anyPort = 0
 Constant that can be used as a placeholder for an arbitrary port, e.g.


Detailed Description

Interface of the three socket classes, MessageSocket, CommSocket and ListenerSocket.

Definition in file Sockets.hpp.