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 ()
int strlen (char *)
static char[] toString (char *s)
static int lastError ()

Variables

module mango io Socket
import mango utils Text
import mango format Int
import mango sys 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
public class VersionAres import
std c 
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, private]
 

Load and unload the Win32 socket library

Definition at line 129 of file Socket.d.

References version.

static ~this  )  [static, private]
 

Definition at line 140 of file Socket.d.

References version.

int strlen char *   )  [private]
 

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

Definition at line 159 of file Socket.d.

References strlen().

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

static int lastError  )  [static]
 

Definition at line 468 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 format Int
 

Definition at line 73 of file Socket.d.

import mango sys System
 

Definition at line 75 of file Socket.d.

import mango io Resource
 

Definition at line 77 of file Socket.d.

import mango io mango io Exception
 

Definition at line 77 of file Socket.d.

import mango io model IBuffer
 

Definition at line 80 of file Socket.d.

const socket_t INVALID_SOCKET = socket_t.init
 

Definition at line 119 of file Socket.d.

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

const int SOCKET_ERROR = -1
 

Definition at line 120 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().

else import std stdint
 

Definition at line 154 of file Socket.d.


Generated on Fri Nov 11 18:44:27 2005 for Mango by  doxygen 1.4.0