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

Socket.d File Reference

Go to the source code of this file.

Classes

class  Versionlinux
class  Versiondarwin
class  VersionWin32
class  VersionWin32
class  VersionBsdSockets

Functions

static this ()
static ~this ()
C int strlen (char *)
static char[] toString (char *s)
static int lastError ()

Variables

module mango io Socket
import mango text Text
import mango convert Integer
import mango sys OS
import mango io Conduit
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 Anders F Bjorklund (Darwin patches)

Definition in file Socket.d.


Function Documentation

static this  )  [static]
 

Load and unload the Win32 socket library

Definition at line 126 of file Socket.d.

References version.

static ~this  )  [static]
 

Definition at line 137 of file Socket.d.

References version.

C int strlen char *   )  [private]
 

static char [] toString char *  s  )  [static, private]
 

Definition at line 155 of file Socket.d.

References strlen().

Referenced by TokenStack::clone(), and StartLine::VersionUseTokenizer::write().

static int lastError  )  [static]
 

Definition at line 450 of file Socket.d.

References version.


Variable Documentation

module mango io Socket
 

Definition at line 67 of file Socket.d.

import mango text Text
 

Definition at line 69 of file Socket.d.

import mango convert Integer
 

Definition at line 71 of file Socket.d.

import mango sys OS
 

Definition at line 73 of file Socket.d.

import mango io Conduit
 

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 116 of file Socket.d.

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

const int SOCKET_ERROR = -1
 

Definition at line 117 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 147 of file Socket.d.


Generated on Sat Dec 24 17:28:36 2005 for Mango by  doxygen 1.4.0