NGStreams is a library somewhat comparable to the java.io package. It contains various "stream" classes for accessing network sockets, local files or data objects in a "streaming fashion"

Introduction

This library contains Objective-C classes to access files and network sockets using a java.io like streaming mechanism. It also abstracts the Unix socket API (that is, we have extensible classes for socket domains, addresses etc)

Notable Features

  • Nonblocking IO
  • Support for libFoundation runloop
  • Extensible socket() support
  • Structured error objects
  • Separation of data and text (unicode) streams
  • Does explicitly not use thread-locks (use NGLockingStream for that)
  • Support for datagram (UDP) sockets

  • Defaults

    ProfileByteBufferEnabled = NO;
    

    Protocols

    NGSerializer
    NGActiveSocket
    NGPositionableStream
    NGDatagramPacket
    NGSocketAddress
    NGSocketDomain
    

    Class Hierarchy

    NSObject
    NGStream < NGStream, NGByteSequenceStream > (serialization) <NGSerializer>
    NGFileStream < NGPositionableStream >
    NGDataStream < NGPositionableStream >
    NGTaskStream
    NGFilterStream
    NGBase64Stream
    NGBufferedStream
    NGByteBuffer
    NGByteCountStream
    NGLockingStream
    NGSocket < NGSocket >
    NGActiveSocket < NGActiveSocket > (serialization) < NGSerializer >
    NGPassiveSocket < NGPassiveSocket >
    NGDatagramSocket
    NGTextStream < NGExtendedTextStream >
    NGStringTextStream
    NGCTextStream
    NGFilterTextStream
    NGCharBuffer
    NGDatagramPacket < NGDatagramPacket >
    NGInternetSocketAddress < NSCopying, NSCoding, NGSocketAddress >
    NGInternetSocketDomain < NSCoding, NSCopying, NGSocketDomain >
    NGLocalSocketAddress < NSCopying, NGSocketAddress >
    NGLocalSocketDomain < NSCopying, NSCoding, NGSocketDomain >
    NSFileHandle
    NGConcreteStreamFileHandle
    NSCoder
    NGStreamCoder < NSObjCTypeSerializationCallBack >
    NSPipe
    NGStreamPipe < NGStream, NGByteSequenceStream >
    

    Exceptions

    NSException
    NGIOException
    NGStreamException
    NGEndOfStreamException
    NGSocketShutdownException
    NGSocketShutdownDuringReadException
    NGSocketShutdownDuringWriteException
    NGSocketTimedOutException
    NGSocketConnectionResetException
    NGCouldNotOpenStreamException
    NGCouldNotCloseStreamException
    NGStreamNotOpenException
    NGStreamErrorException
    NGStreamReadErrorException
    NGStreamWriteErrorException
    NGStreamSeekErrorException
    NGStreamModeException
    NGUnknownStreamModeException
    NGReadOnlyStreamException
    NGWriteOnlyStreamException
    NGIOAccessException
    NGIOSearchAccessException
    NGSocketException
    NGCouldNotResolveHostNameException
    NGDidNotFindServiceException
    NGInvalidSocketDomainException
    NGCouldNotCreateSocketException
    NGSocketBindException
    NGSocketAlreadyBoundException
    NGCouldNotBindSocketException
    NGSocketConnectException
    NGSocketNotConnectedException
    NGSocketAlreadyConnectedException
    NGCouldNotConnectException
    NGSocketIsAlreadyListeningException
    NGCouldNotListenException
    NGCouldNotAcceptException
    NGSocketOptionException
    NGCouldNotSetSocketOptionException
    NGCouldNotGetSocketOptionException