// This may look like C code, but it is really -*- C++ -*-
// 
// <copyright> 
//  
//  Copyright (c) 1996
//  Institute for Information Processing and Computer Supported New Media (IICM), 
//  Graz University of Technology, Austria. 
//  
// </copyright> 
// 
// 
// <file> 
// 
// Name:        
// 
// Purpose:     
// 
// Created:     30 Jan 96   Joerg Faschingbauer
// 
// Modified:    
// 
// Description: 
// 
// $Id: tiounixsrc_a.C,v 1.4 1996/12/17 13:20:28 jfasch Exp $
// 
// $Log: tiounixsrc_a.C,v $
// Revision 1.4  1996/12/17 13:20:28  jfasch
// NT namespace pollutors
//
// Revision 1.3  1996/10/03 12:02:50  jfasch
// verbose.h and assert.h moved
//
// Revision 1.2  1996/07/22 08:18:19  jfasch
// *** empty log message ***
//
// Revision 1.1  1996/07/08 13:16:36  jfasch
// Initial revision
//
// 
// </file> 
#include "tiounixsrc_a.h"

#include "tsockio.h"

#include <hyperg/utils/assert.h>
#include <hyperg/utils/new.h>
#include <hyperg/utils/unixsocket.h>

// --------------------------------------------------------------------
TIOSourceActive::Make TIOSourceActive_UNIX :: make (TransparentIOPtr& tio, TIOSourceActiveUser*) {
   tio = TransparentIOPtr() ; // be sure to nil it out
   SocketPtr s (HGNEW (UNIXSocket (path_))) ;
   if (! s.ptr()->ok())
      return TIOSourceActive::TIOERROR ;
   else {
      tio = TransparentIOPtr (HGNEW (TransparentSocketIO (s))) ;
      return TIOSourceActive::TIOREADY ;
   }
}

void TIOSourceActive_UNIX :: cancel (const TIOSourceActiveUser*) {
   hgassert (false, "TIOSourceActive_UNIX::cancel(): cannot have returned WAIT on make()") ;
}

