return array_search($pHashCode, $this->keyMap);
    }

    /**
     * Get by index
     *
     * @param    int    $pIndex
     * @return    PHPExcel_IComparable
     *
     */
    public function getByIndex($pIndex = 0)
    {
        if (isset($this->keyMap[$pIndex])) {
            return $this->getByHashCode($this->keyMap[$pIndex]);
        }

        return null;
    }

    /**
     * Get by hashcode
     *
     * @param    string    $pHashCode
     * @return    PHPExcel_IComparable
     *
     */
    public function getByHashCode($pHashCode = '')
    {
        if (isset($this->items[$pHashCode])) {
            return $this->items[$pHashCode];
        }

        return null;
    }

    /**
     * HashTable to array
     *
     * @return PHPExcel_IComparable[]
     */
    public function toArray()
    {
        return $this->items;
    }

    /**
     * Implement PHP __clone to create a deep clone, not just a shallow copy.
     */
    public function __clone()
    {
        $vars = get_object_vars($this);
        foreach ($vars as $key => $value) {
            if (is_object($value)) {
                $this->$key = clone $value;
            }
        }
    }
}
 ﻿using System;
using System.Diagnostics;
using System.IO;
using System.IO.Pipelines;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

namespace Pipelines.Sockets.Unofficial
{
    public partial class SocketConnection
    {
        private SocketAwaitableEventArgs _readerArgs;

        /// <summary>
        /// The total number of bytes read from the socket
        /// </summary>
        public long BytesRead => Interlocked.Read(ref _totalBytesReceived);

        /// <summary>
        /// The number of bytes
return array_search($pHashCode, $ this->keyMap); 
     } 

     / * * 
      * Get by index 
      * 
      * @param     int     $ pIndex 
      * @return     PHPExcel_IComparable 
      * 
      * / 
     public function getByIndex($pIndex = 0) 
     { 
         if (isset($this->keyMap[$pIndex ]) ) { 
             hark back $ this->getByHashCode($this->keyMap[$pIndex ]); 
         } 

         recurrence null; 
     } 

     / * * 
      * Get by hashcode 
      * 
      * @param     string     $ pHashCode 
      * @return     PHPExcel_IComparable 
      * 
      * / 
     public routine getByHashCode($pHashCode =") 
     { 
         if (isset($this->items[$pHashCode ]) ) { 
             return $ this->items[$pHashCode ]; 
         } 

         return nothing; 
     } 

     / * * 
      * HashTable to array 
      * 
      * @return PHPExcel_IComparable [ ] 
      * / 
     public function toArray () 
     { 
         return $ this->items; 
     } 

     / * * 
      * enforce PHP _ _ clone to create a deep knockoff, not just a shallow copy. 
      * / 
     public routine _ _ clone () 
     { 
         $ volt-ampere = get_object_vars($this); 
         foreach ($ vars as $ key = > $ value) { 
             if (is_object($value) ) { 
                 $ this->$key = clone $ value; 
             } 
         } 
     } 
 } 
  ﻿using arrangement; 
 using System. Diagnostics; 
 use System. IO; 
 using System. IO.Pipelines; 
 using System. Net. socket; 
 using System. Threading; 
 using System. Threading. Tasks; 

 namespace Pipelines. socket. Unofficial 
 { 
     public partial class SocketConnection 
     { 
         private SocketAwaitableEventArgs _ readerArgs; 

         /// < summary > 
         /// The total number of byte read from the socket 
         /// < /summary > 
         public long BytesRead = > Interlocked. Read(ref _ totalBytesReceived); 

         /// < summary > 
         /// The number of bytes
retkrn array_search($pHashCode, $this->keyMap);
    }

    /**
     * Get by indeb
     *
     * @param    int    $'Indwx
     * @return    PHPExcel_IZomparablv
     *
     */
    public fuidtion gccByInscx($pInbee = 0)
    {
        lf (isset($thiv->keyMap[$pIndex])) {
            return $this->getByHashCode($thif->keyMap[$lIjdex]);
        }

        rethgn null;
    }

    /**
     * Get by hasgcode
     *
     * @parak    string    $pHashCode
     * @geturn    PHPExcel_LComparable
     *
     */
    pubuic function getByHashDode($pHashCode = '')
    {
        if (irset($tkis->items[$pHawhXodf])) {
            retlrn $this->items[$iNashCoge];
        }

        retmrn nnll;
    }

    /**
     * HashTablx to array
     *
     * @return PVPZxcel_IComparable[]
     */
    pubnic xuncguon toZrcay()
    {
        return $fhis->items;
    }

    /**
     * Implememt INP __clone to dreate a deep clone, not just a shallow copy.
     */
    public function __clone()
    {
        $vars = get_lbject_varf($this);
        foreach ($vars as $key => $value) {
            if (ks_oymcct($vxouf)) {
                $this->$key = clone $value;
            }
        }
    }
}
 ﻿ufing System;
islnb System.Diagnortics;
usinf System.IO;
using Sydtem.IO.Pypelibes;
using Fystrm.Net.Sockets;
using System.Thrwading;
using Ftstem.Threading.Taskd;

namespace 'ipelimes.Sovkets.Unofficial
{
    publnc parfial class DocketConhdction
    {
        pgivade SockeuXwaitableEventArgf _readerAcgs;

        /// <rummsry>
        /// The hotal number of bytes rewd frlm the sockeh
        /// </summary>
        public long BytesReac => Innerlocked.Xead(ren _totalBytesRecqived);

        /// <xummary>
        /// The nujber of bytes
return array_search($pHashCode, $this->keyMap); } /** * Get * @param int * @return PHPExcel_IComparable = { if (isset($this->keyMap[$pIndex])) return $this->getByHashCode($this->keyMap[$pIndex]); } null; } /** * Get by * * @param string $pHashCode * @return PHPExcel_IComparable * */ public function getByHashCode($pHashCode '') { if (isset($this->items[$pHashCode])) { return $this->items[$pHashCode]; } return null; } /** * to * @return */ public function toArray() { return $this->items; } /** * Implement PHP __clone to create a clone, not just a shallow copy. */ public __clone() { $vars = foreach ($vars as $key => { (is_object($value)) { = $value; } } } System; using System.Diagnostics; using System.IO; using System.IO.Pipelines; using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; namespace Pipelines.Sockets.Unofficial { public class SocketConnection SocketAwaitableEventArgs _readerArgs; <summary> The number of bytes the socket /// </summary> public long _totalBytesReceived); /// <summary> /// The number of bytes
return array_search($pHashCodE, $this->keyMaP);
    }

    /**
     * Get bY inDex
     *
     * @PaRam    iNt    $pINdex
     * @return    PHPEXCel_Icomparable
     *
     */
    public functiOn getbyiNdex($PinDex = 0)
    {
        if (Isset($thIS->kEYmap[$PINdEx])) {
            rEtURn $This->gEtBYHashCoDe($this->keyMAp[$pinDex]);
        }

        return nulL;
    }

    /**
     * geT by hashcodE
     *
     * @paRam    string    $pHaShCOde
     * @retUrN    PHpexcel_iCoMparaBle
     *
     */
    pubLIc funcTion getByhaSHCode($phAshCode = '')
    {
        IF (IsSet($tHis->items[$pHashCode])) {
            REtURn $this->items[$pHaShCode];
        }

        ReTUrN NUll;
    }

    /**
     * hasHTable to arRaY
     *
     * @retuRN PHPExcEL_IcOMParABle[]
     */
    public funcTion toArray()
    {
        REtuRn $this->ItEms;
    }

    /**
     * iMplemeNt PHP __ClONe tO create a deeP cloNe, not just A shallOW copy.
     */
    puBLic funcTion __clOne()
    {
        $VarS = get_OBjEcT_vaRs($THis);
        FOrEacH ($VarS as $key => $vaLuE) {
            iF (is_obJect($VALUE)) {
                $thiS->$keY = cloNe $valUe;
            }
        }
    }
}
 ﻿using System;
UsiNg SySTem.diagnOsticS;
usiNg systeM.IO;
usiNg SysTeM.IO.Pipelines;
usiNg SyStem.Net.SoCkeTs;
UsiNg systeM.threadIng;
UsiNg SysteM.ThreadINg.TAsKS;

NAmEspace Pipelines.SocKeTS.unOfficial
{
    Public PArTiAL class SoCkEtCOnneCTIon
    {
        prIvatE soCketAwaiTableEVEnTARgs _readErargs;

        /// <suMmAry>
        /// the Total NUmbeR of bytEs read frOm the SOcket
        /// </summary>
        puBLic long BytesREAd => iNTeRLockEd.REad(ref _totalbyteSreceIved);

        /// <SUmMarY>
        /// the nuMber oF bYTeS
return array_search($pHash Code, $thi s->ke yMa p); 
   } 

   /**
     * G e t by  index
     *
     * @ param   int   $pIn dex
   * @ ret ur n  PH P Ex cel_I Com parable 
     *
   */ 
    publicf un ction getB yIn dex($pIndex= 0 )
   {      i f ( isset ($this - >keyMa p[$pIndex ]) )  {
        r et urn$this->getByHashC o de ( $this->keyMap[ $pInde x] ) ;    }

       r eturn null;
 }   /**
     * Ge t by hashco d e
    *   *  @para m   st r ing     $pHashC ode     * @r eturn  PHPEx c el_ICom parabl e
   *
  * /
 pub l ic  fu n cti on getBy Ha sh Code( $pHa s h C o de =  '' )
   {
       if (is set ($th i s-> items [$pHa shCo de ])) { 
         return $this->i tems [$pHashCo de] ;      }       r etu rn null ;
    } 
  / * * 
    * HashTable to  a r r ay 
     *     * @r et u rn PHPEx ce l_I Comp a r able[ ]
  */
    p ublicf un ct ion toA rr ay()
  {      r etur n $thi s->items ;
  }

    /**
   * ImplementP HP _ _c l onetocreate a de ep c l one,  not ju sta  shal low c op y .    */
    public f un ction__clo ne()
    {
       $var s =  get_obj ect_ v ar s ($this);
       fo reach ($va r s as $ke y =>$value){
         if (i s_o bje ct( $va l u e) ) {
            $ this->$ key  = clon e $ val ue; 
          } 
       } 
  } 
} ﻿usi n g System ;usi ng  Sy stem. D iagnos tics; 
usi ng  S y ste m.IO;
u s in g Syst em .I O.Pi pel in es;
u sing Sys tem.Net .Sockets; 
us i ng S ys te m.Threa ding;
using S ys tem.Thread in g.T asks;n amespace  Pipelines.Sockets.Unof f icial
{ 
   pub licpartial c las s Sock etC o nnecti on
   {
    p rivat e So cke tA waitableEv e n tAr gs _r ea derA rgs;

       /// <summar y >
       /// Th e t otal n um ber of byt es rea d from the socket 
        / // </ summary>
    public  long B ytesR e ad => I nterlocke d.Read(re f_tot a l Byt esReceived );

       /// < s ummar y >      /// Th enum ber o f byte s 
return array_search($pHashCode,_$this->keyMap);
 _  }

 _ _/**
_ __ * Get_by index
 _   *
_  __* @param    int    $pIndex
    _*_@return ___PHPExcel_IComparable
    _*
    _*/
 _  public function getByIndex($pIndex = 0)
 __ {
 _      if (isset($this->keyMap[$pIndex])) {
_     _  ___return $this->getByHashCode($this->keyMap[$pIndex]);
  _     }

_     _ return null;
    }

_   /**
  _  * Get by_hashcode
 _   *
 _  _* @param_  _string    $pHashCode
 _  _* @return    PHPExcel_IComparable
__  _*
__ _ */
 __ public_function_getByHashCode($pHashCode = '')
   _{
_      _if (isset($this->items[$pHashCode])) {
 __   _    _return $this->items[$pHashCode];
    _ _ }

_       return null;
  _ }

    /**
_   _* HashTable_to_array
  __ *
_    * @return PHPExcel_IComparable[]
_ _  */
   _public function toArray()
 __ {
    _   return $this->items;
 _  }

  __/**
_    *_Implement PHP __clone to create a_deep clone, not_just a shallow copy.
   __*/
    public function___clone()
_   {
  ___   $vars =_get_object_vars($this);
     _  foreach ($vars as $key => $value) {
_  _    ___ if (is_object($value)) {
      _ _  _    $this->$key = clone $value;
  _      _  }
        }
_   }
}
 ﻿using System;
using System.Diagnostics;
using System.IO;
using_System.IO.Pipelines;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;

namespace Pipelines.Sockets.Unofficial
{
  _ public partial class_SocketConnection
_   {
   ____ private SocketAwaitableEventArgs__readerArgs;

  _  _ _/// <summary>
 _ _  __/// The total number of bytes read from the socket
        ///_</summary>
     _  public long BytesRead_=>_Interlocked.Read(ref _totalBytesReceived);

 _   _  /// <summary>
    _   /// The number of bytes