Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Socket.d File Reference

Go to the source code of this file.

Classes

class  Versionlinux
class  VersionWin32
class  VersionBsdSockets
class  VersionWin32
class  VersionBsdSockets
class  HostException
class  SocketException
class  AddressException
class  SocketAcceptException
class  Socket
class  Address
class  UnknownAddress
class  InternetHost
class  InternetAddress
class  SocketSet
class  SocketSet::VersionWin32
class  SocketSet::Versionlinux
struct  IListener
struct  ISocketReader

Functions

 this ()
 ~this ()
int lastError ()

Variables

module mango io Socket
import mango utils Text
import mango base System
import mango io Resource
import mango io mango io Exception
import mango io model IBuffer
const socket_t INVALID_SOCKET = socket_t.init
const int SOCKET_ERROR = -1
import std stdint


Detailed Description

Mango coercion of the excellent socket.d implementation written by Chris Miller.

The original code has been modified in several ways:

1) It has been altered to fit within the Mango environment, meaning that certain original classes have been reorganized, and/or have subclassed Mango base-classes. For example, the original Socket class has been wrapped with three distinct subclasses, and now derives from class mango.io.Resource.

2) All exception instances now subclass the Mango IOException.

3) Construction of new Socket instances via accept() is now overloadable.

4) Constants and enums have been moved within a class boundary to ensure explicit namespace usage.

5) changed Socket.select() to loop if it was interrupted.

All changes within the main body of code all marked with "MANGO:"

For a good tutorial on socket-programming I highly recommend going here: http://www.ecst.csuchico.edu/~beej/guide/net/

Version:
Initial version, March 2004
Author:
Christopher Miller, Kris Bell

Definition in file Socket.d.


Function Documentation

this  )  [static, private]
 

Load and unload the Win32 socket library

Definition at line 115 of file Socket.d.

References version.

~this  )  [static, private]
 

Definition at line 126 of file Socket.d.

References version.

int lastError  )  [static]
 

Definition at line 443 of file Socket.d.

References version.


Variable Documentation

module mango io Socket
 

Definition at line 69 of file Socket.d.

import mango utils Text
 

Definition at line 71 of file Socket.d.

import mango base System
 

Definition at line 73 of file Socket.d.

import mango io Resource
 

Definition at line 75 of file Socket.d.

import mango io mango io Exception
 

Definition at line 75 of file Socket.d.

import mango io model IBuffer
 

Definition at line 78 of file Socket.d.

const socket_t INVALID_SOCKET = socket_t.init
 

Definition at line 105 of file Socket.d.

Referenced by Socket::accept(), and Socket::reset().

const int SOCKET_ERROR = -1
 

Definition at line 106 of file Socket.d.

Referenced by Socket::bind(), Socket::blocking(), Socket::connect(), Socket::getOption(), Socket::hostName(), Socket::isAlive(), Socket::listen(), Socket::localAddress(), Socket::receive(), Socket::receiveFrom(), Socket::remoteAddress(), Socket::setGroup(), and Socket::setOption().

import std stdint
 

Definition at line 137 of file Socket.d.


Generated on Sun Nov 7 19:06:57 2004 for Mango by doxygen 1.3.6