WvIPRawStream Class Reference

WvIPRawStream can send and receive packets on a connectionless IP socket. More...

#include <wvipraw.h>

Inheritance diagram for WvIPRawStream:
[legend]

List of all members.

Public Member Functions

 WvIPRawStream (const WvIPAddr &_local, const WvIPAddr &_rem, int ip_protocol=IPPROTO_RAW)
 connect a new socket
const WvAddrlocal () const
virtual const WvAddrsrc () const
 return the remote address (source of incoming packets, target of outgoing packets).
void setdest (const WvIPAddr &_remaddr)
void enable_broadcasts ()
const char * wstype () const
int getrfd () const
 Returns the Unix file descriptor for reading from this stream.
int getwfd () const
 Returns the Unix file descriptor for writing to this stream.
int getfd () const
 Returns the Unix file descriptor for reading and writing.
void set_nonblock (bool nonblock)
 Make the fds on this stream blocking or non-blocking.
void set_close_on_exec (bool close_on_exec)
 Make the fds on this stream close-on-exec or not.
virtual void close ()
 Closes the file descriptors.
virtual bool isok () const
 return true if the stream is actually usable right now
virtual void pre_select (SelectInfo &si)
 pre_select() sets up for eventually calling select().
void pre_select (SelectInfo &si, const SelectRequest &r)
 A more convenient version of pre_select() usable for overriding the 'want' value temporarily.
virtual bool post_select (SelectInfo &si)
 post_select() is called after select(), and returns true if this object is now ready.
bool post_select (SelectInfo &si, const SelectRequest &r)
 A more convenient version of post_select() usable for overriding the 'want' value temporarily.
virtual void maybe_autoclose ()
 Auto-close the stream if the time is right.
virtual void seterr (int _errnum)
 Override seterr() from WvError so that it auto-closes the stream.
void seterr (WvStringParm specialerr)
void seterr (WVSTRING_FORMAT_DECL)
void seterr (const WvErrorBase &err)
virtual size_t read (void *buf, size_t count)
 read a data block on the stream.
virtual size_t read (WvBuf &outbuf, size_t count)
 Reads up to 'count' bytes of data from the stream into the buffer.
virtual void unread (WvBuf &outbuf, size_t count)
 Puts data back into the stream's internal buffer.
virtual size_t write (const void *buf, size_t count)
 Write data to the stream.
virtual size_t write (WvBuf &inbuf, size_t count=INT_MAX)
 Writes data to the stream from the given buffer.
size_t write (WvStringParm s)
 print a preformatted WvString to the stream.
void outbuf_limit (size_t size)
 set the maximum size of outbuf, beyond which a call to write() will return 0.
virtual void noread ()
 Shuts down the reading side of the stream.
virtual void nowrite ()
 Shuts down the writing side of the stream.
virtual bool isreadable ()
 Returns true if the stream is readable.
virtual bool iswritable ()
 Returns true if the stream is writable (without using the outbuf).
char * getline (time_t wait_msec=0, char separator= '\n', int readahead=1024)
 Read up to one line of data from the stream and return a pointer to the internal buffer containing this line.
char * getline (int wait_msec, char separator= '\n', int readahead=1024)
 Auto-convert int to time_t.
char * getline (double wait_msec, char separator= '\n', int readahead=1024)
 Auto-convert double to time_t.
char * blocking_getline (time_t wait_msec, int separator= '\n', int readahead=1024)
 This is a version of getline() that allows you to block for more data to arrive.
char * continue_getline (time_t wait_msec, int separator= '\n', int readahead=1024)
 This is a version of blocking_getline() that uses continue_select to avoid blocking other streams.
void queuemin (size_t count)
 force read() to not return any bytes unless 'count' bytes can be read at once.
void drain ()
 drain the input buffer (read and discard data until select(0) returns false)
void delay_output (bool is_delayed)
 force write() to always buffer output.
void auto_flush (bool is_automatic)
 if true, force write() to call flush() each time, the default behavour.
virtual bool flush (time_t msec_timeout)
 flush the output buffer, if we can do it without delaying more than msec_timeout milliseconds at a time.
virtual bool should_flush ()
 Returns true if we want to flush the output buffer right now.
void flush_then_close (int msec_timeout)
 flush the output buffer automatically as select() is called.
void xpre_select (SelectInfo &si, const SelectRequest &r)
 Like pre_select(), but still exists even if you override the other pre_select() in a subclass.
bool xpost_select (SelectInfo &si, const SelectRequest &r)
 Like post_select(), but still exists even if you override the other post_select() in a subclass.
bool select (time_t msec_timeout)
 Return true if any of the requested features are true on the stream.
bool select (time_t msec_timeout, bool readable, bool writable, bool isex=false)
 This version of select() sets forceable==false, so we use the exact readable/writable/isexception options provided.
void runonce (time_t msec_timeout=-1)
 Exactly the same as: if (select(timeout)) callback();.
IWvStream::SelectRequest get_select_request ()
 Use get_select_request() to save the current state of the selection state of this stream.
void force_select (bool readable, bool writable, bool isexception=false)
 Use force_select() to force one or more particular modes (readable, writable, or isexception) to true when selecting on this stream.
void undo_force_select (bool readable, bool writable, bool isexception=false)
 Undo a previous force_select() - ie.
bool continue_select (time_t msec_timeout)
 return to the caller from execute(), but don't really return exactly; this uses WvCont::yield() to return to the caller of callback() without losing our place in execute() itself.
void terminate_continue_select ()
 you MUST run this from your destructor if you use continue_select(), or very weird things will happen if someone deletes your object while in continue_select().
void setcallback (IWvStreamCallback _callfunc)
 define the callback function for this stream, called whenever the callback() member is run, and passed the 'userdata' pointer.
IWvStreamCallback setreadcallback (IWvStreamCallback _callback)
 Sets a callback to be invoked when the stream is readable.
IWvStreamCallback setwritecallback (IWvStreamCallback _callback)
 Sets a callback to be invoked when the stream is writable.
IWvStreamCallback setexceptcallback (IWvStreamCallback _callback)
 Sets a callback to be invoked when the stream is in exception state.
IWvStreamCallback setclosecallback (IWvStreamCallback _callback)
 Sets a callback to be invoked on close().
void autoforward (WvStream &s)
 set the callback function for this stream to an internal routine that auto-forwards all incoming stream data to the given output stream.
void noautoforward ()
 Stops autoforwarding.
void * _callwrap (void *)
 A wrapper that's compatible with WvCont, but calls the "real" callback.
void _callback ()
 Actually call the registered callfunc and execute().
virtual void callback ()
 if the stream has a callback function defined, call it now.
void alarm (time_t msec_timeout)
 set an alarm, ie.
time_t alarm_remaining ()
 return the number of milliseconds remaining before the alarm will go off; -1 means no alarm is set (infinity), 0 means the alarm has been hit and will be cleared by the next callback().
size_t print (WvStringParm s)
size_t print (WVSTRING_FORMAT_DECL)
 preformat and write() a string.
size_t operator() (WvStringParm s)
size_t operator() (WVSTRING_FORMAT_DECL)
const char * wsname () const
void set_wsname (WvStringParm wsname)
void set_wsname (WVSTRING_FORMAT_DECL)
WSID wsid () const
virtual WvString getattr (WvStringParm name) const
virtual int geterr () const
 If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file.
virtual WvString errstr () const
void seterr_both (int _errnum, WvStringParm specialerr)
void seterr_both (int _errnum, WVSTRING_FORMAT_DECL)
void noerr ()
 Reset our error state - there's no error condition anymore.
virtual unsigned int addRef ()=0
 Indicate you are using this object.
virtual unsigned int release ()=0
 Indicate that you are finished using this object.
virtual IObjectgetInterface (const UUID &)=0
 Returns the requested XPLC interface.
virtual IWeakRefgetWeakRef ()=0
 Return a weak reference to this object.

Static Public Member Functions

static void autoforward_callback (WvStream &input, WvStream &output)
static IWvStreamfind_by_wsid (WSID wsid)
static IWvStreamcreate (WvStringParm moniker, IObject *obj=NULL)
static WvString strerror (int errnum)
 A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32).

Public Attributes

WvStreamread_requires_writable
 If this is set, select() doesn't return true for read unless the given stream also returns true for write.
WvStreamwrite_requires_readable
 If this is set, select() doesn't return true for write unless the given stream also returns true for read.
bool uses_continue_select
 If this is set, enables the use of continue_select().
size_t personal_stack_size
 Specifies the stack size to reserve for continue_select().
bool alarm_was_ticking
 This will be true during callback execution if the callback was triggered by the alarm going off.
bool stop_read
 True if noread()/nowrite()/close() have been called, respectively.
bool stop_write
bool closed

Protected Member Functions

virtual size_t uread (void *buf, size_t count)
 unbuffered I/O functions; these ignore the buffer, which is handled by read().
virtual size_t uwrite (const void *buf, size_t count)
 unbuffered I/O functions; these ignore the buffer, which is handled by write().
void setfd (int fd)
 Sets the file descriptor for both reading and writing.
void setattr (WvStringParm name, WvStringParm value)
void _build_selectinfo (SelectInfo &si, time_t msec_timeout, bool readable, bool writable, bool isexcept, bool forceable)
int _do_select (SelectInfo &si)
bool _process_selectinfo (SelectInfo &si, bool forceable)
bool flush_outbuf (time_t msec_timeout)
virtual bool flush_internal (time_t msec_timeout)
virtual void execute ()
 The callback() function calls execute(), and then calls the user- specified callback if one is defined.

Static Protected Member Functions

static void debugger_streams_display_header (WvStringParm cmd, WvStreamsDebugger::ResultCallback result_cb)
static void debugger_streams_display_one_stream (WvStream *s, WvStringParm cmd, WvStreamsDebugger::ResultCallback result_cb)
static void debugger_streams_maybe_display_one_stream (WvStream *s, WvStringParm cmd, const WvStringList &args, WvStreamsDebugger::ResultCallback result_cb)

Protected Attributes

WvIPAddr localaddr
WvIPAddr remaddr
int rfd
 The file descriptor for reading.
int wfd
 The file descriptor for writing.
bool shutdown_read
 Have we actually shut down the read/write sides?
bool shutdown_write
WvDynBuf inbuf
WvDynBuf outbuf
IWvStreamCallback callfunc
wv::function< void *(void *) call_ctx )
IWvStreamCallback readcb
IWvStreamCallback writecb
IWvStreamCallback exceptcb
IWvStreamCallback closecb
size_t max_outbuf_size
bool outbuf_delayed_flush
bool is_auto_flush
bool want_to_flush
bool is_flushing
size_t queue_min
time_t autoclose_time
WvTime alarm_time
WvTime last_alarm_check
int errnum
WvString errstring

Static Protected Attributes

static WvStreamglobalstream = NULL

Friends

class WvHTTPClientProxyStream

Detailed Description

WvIPRawStream can send and receive packets on a connectionless IP socket.

In the constructor, the socket is attached using bind() to the given _local address. If the address is 0.0.0.0, all addresses on the local host are used; if the port is 0, an available port number is chosen automatically.

If the _rem address is 0.0.0.0, the port is not connect()ed. That means it can receive packets from anywhere and send them to anywhere. The src() and setdest() functions are useful for this. If _rem is not 0.0.0.0, connect() is called and the socket will only accept data to/from the specified remote UDP address.

Buffering: all the usual WvStream-style input buffering is available, including getline(), but because input packets may get lost it is of limited usefulness. Buffering will cause particular confusion if the socket is not connect()ed.

Definition at line 32 of file wvipraw.h.


Member Function Documentation

const WvAddr * WvIPRawStream::src (  )  const [virtual]

return the remote address (source of incoming packets, target of outgoing packets).

This is the last host sent to or received from, whichever was more recent.

Reimplemented from WvStream.

Definition at line 70 of file wvipraw.cc.

size_t WvIPRawStream::uread ( void *  buf,
size_t  count 
) [protected, virtual]

unbuffered I/O functions; these ignore the buffer, which is handled by read().

Don't call these functions explicitly unless you have a _really_ good reason.

This is what you would override in a derived class.

Reimplemented from WvFdStream.

Definition at line 82 of file wvipraw.cc.

References WvFdStream::getfd(), and WvFdStream::isok().

size_t WvIPRawStream::uwrite ( const void *  buf,
size_t  count 
) [protected, virtual]

unbuffered I/O functions; these ignore the buffer, which is handled by write().

Don't call these functions explicitly unless you have a _really_ good reason.

This is what you would override in a derived class.

Reimplemented from WvFdStream.

Definition at line 98 of file wvipraw.cc.

References WvFdStream::getfd(), WvFdStream::isok(), and WvStream::seterr().

void WvFdStream::setfd ( int  fd  )  [inline, protected, inherited]

Sets the file descriptor for both reading and writing.

Convenience method.

Definition at line 36 of file wvfdstream.h.

References WvFdStream::rfd, and WvFdStream::wfd.

Referenced by _WvConStream::close(), WvTCPConn::do_connect(), WvIPRawStream(), WvUDPStream::WvUDPStream(), and WvUnixConn::WvUnixConn().

int WvFdStream::getrfd (  )  const [inline, virtual, inherited]

Returns the Unix file descriptor for reading from this stream.

Returns: the file descriptor, or -1 if none

Reimplemented from WvStream.

Definition at line 63 of file wvfdstream.h.

References WvFdStream::rfd.

Referenced by WvModem::close(), WvResolver::findaddr(), UniFileSystemGen::get(), WvModemBase::hangup(), UniIniGen::refresh(), WvFdStream::set_close_on_exec(), WvFdStream::set_nonblock(), WvModem::speed(), and WvPipe::WvPipe().

int WvFdStream::getwfd (  )  const [inline, virtual, inherited]

Returns the Unix file descriptor for writing to this stream.

Returns: the file descriptor, or -1 if none

Reimplemented from WvStream.

Definition at line 70 of file wvfdstream.h.

References WvFdStream::wfd.

Referenced by WvLogFileBase::_end_line(), UniIniGen::commit(), WvResolver::findaddr(), WvPipe::finish(), WvFdStream::set_close_on_exec(), WvFdStream::set_nonblock(), and WvPipe::WvPipe().

int WvFdStream::getfd (  )  const [inline, inherited]

Returns the Unix file descriptor for reading and writing.

Asserts that the file descriptors for reading and writing are the same before returning.

Returns: the file descriptor, or -1 if none

Definition at line 81 of file wvfdstream.h.

References WvFdStream::rfd, and WvFdStream::wfd.

Referenced by WvTCPConn::debug_mode(), WvTCPConn::do_connect(), WvTCPConn::localaddr(), WvTCPConn::low_delay(), WvTCPConn::nice_tcpopts(), WvTCPConn::post_select(), WvSSLStream::post_select(), WvUDPStream::uread(), uread(), WvUDPStream::uwrite(), uwrite(), WvIPRawStream(), WvUDPStream::WvUDPStream(), and WvUnixConn::WvUnixConn().

void WvFdStream::set_nonblock ( bool  nonblock  )  [inherited]
void WvFdStream::set_close_on_exec ( bool  close_on_exec  )  [inherited]
void WvFdStream::close (  )  [virtual, inherited]

Closes the file descriptors.

If it is undesirable for the file descriptors to be closed by this stream, duplicate the file descriptors using dup() before creating the stream.

Reimplemented from WvStream.

Reimplemented in WvAtomicFile, WvModemBase, WvModem, and _WvConStream.

Definition at line 117 of file wvfdstream.cc.

References WvFdStream::rfd, and WvFdStream::wfd.

Referenced by UniIniGen::commit(), WvPipe::finish(), WvFdStream::maybe_autoclose(), UniIniGen::refresh(), WvFdStream::~WvFdStream(), and WvPipe::~WvPipe().

void WvFdStream::pre_select ( SelectInfo si  )  [virtual, inherited]

pre_select() sets up for eventually calling select().

It adds the right fds to the read, write, and except lists in the SelectInfo struct.

Returns true if we already know this stream is ready, and there's no need to actually do a real select(). Some streams, such as timers, can be implemented by _only_ either returning true or false here after doing a calculation, and never actually adding anything to the SelectInfo.

You can add your stream to any of the lists even if readable, writable, or isexception isn't set. This is what force_select() does. You can also choose not to add yourself to the list if you know it would be useless right now.

pre_select() is only called if isok() is true.

pre_select() is allowed to reduce msec_timeout (or change it if it's -1). However, it's not allowed to _increase_ msec_timeout.

Reimplemented from WvStream.

Reimplemented in WvFile, WvTCPConn, and WvUnixDGSocket.

Definition at line 214 of file wvfdstream.cc.

References WvFdStream::rfd, WvBufBaseCommonImpl< T >::used(), and WvFdStream::wfd.

Referenced by WvMagicLoopback::pre_select().

bool WvFdStream::post_select ( SelectInfo si  )  [virtual, inherited]

post_select() is called after select(), and returns true if this object is now ready.

Usually this is done by checking for this object in the read, write, and except lists in the SelectInfo structure. If you want to do it in some other way, you should usually do it in pre_select() instead.

You may also want to do extra maintenance functions here; for example, the standard WvStream::post_select tries to flush outbuf if it's nonempty. WvTCPConn might retry connect() if it's waiting for a connection to be established.

Reimplemented from WvStream.

Reimplemented in WvFile, WvTCPConn, and WvUnixDGSocket.

Definition at line 254 of file wvfdstream.cc.

References WvStream::isok(), WvFdStream::isok(), WvStream::read_requires_writable, WvFdStream::rfd, WvStream::select(), WvStream::should_flush(), WvBufBaseCommonImpl< T >::used(), WvFdStream::wfd, and WvStream::write_requires_readable.

Referenced by WvUnixDGSocket::post_select().

void WvFdStream::maybe_autoclose (  )  [virtual, inherited]

Auto-close the stream if the time is right.

If noread() and nowrite() and all buffers are empty, then we can probably close.

Reimplemented from WvStream.

Definition at line 186 of file wvfdstream.cc.

References WvFdStream::close(), WvFdStream::rfd, WvFdStream::shutdown_read, WvStream::stop_read, WvBufBaseCommonImpl< T >::used(), and WvFdStream::wfd.

void WvStream::seterr ( int  _errnum  )  [virtual, inherited]
size_t WvStream::read ( void *  buf,
size_t  count 
) [virtual, inherited]
size_t WvStream::read ( WvBuf outbuf,
size_t  count 
) [virtual, inherited]

Reads up to 'count' bytes of data from the stream into the buffer.

Returns the actual amount read.

If 'count' is greater than the amount of free space available in the buffer, only reads at most that amount. You should specify a reasonable upper bound on how much data should be read at once.

Implements IWvStream.

Definition at line 461 of file wvstream.cc.

References WvBufBaseCommonImpl< T >::alloc(), WvBufBaseCommonImpl< T >::free(), WvBufBaseCommonImpl< T >::merge(), WvStream::read(), and WvBufBaseCommonImpl< T >::unalloc().

void WvStream::unread ( WvBuf outbuf,
size_t  count 
) [virtual, inherited]

Puts data back into the stream's internal buffer.

We cheat so that there's no restriction on how much (or what) data can be unread(). This is different from WvBuf::unget() (which is rather restrictive).

Definition at line 1188 of file wvstream.cc.

References WvBufBaseCommonImpl< T >::merge(), and WvBufBaseCommonImpl< T >::zap().

Referenced by WvHttpStream::execute().

size_t WvStream::write ( const void *  buf,
size_t  count 
) [virtual, inherited]

Write data to the stream.

Returns the actual amount written. Since WvStream has an output buffer, it *always* successfully "writes" the full amount (but you might have to flush the buffers later so it actually gets sent).

Implements IWvStream.

Definition at line 532 of file wvstream.cc.

References WvStream::flush(), WvStream::isok(), WvStream::should_flush(), WvBufBaseCommonImpl< T >::used(), and WvStream::uwrite().

Referenced by WvLogFileBase::_mid_line(), WvDBusClientAuth::authorize(), WvModem::close(), WvIStreamList::execute(), WvHttpStream::execute(), WvModemBase::hangup(), WvLog::operator()(), WvStream::print(), WvDBusConn::send(), UniFileSystemGen::set(), WvProtoStream::uwrite(), WvFdStream::uwrite(), WvStream::write(), and UniClientConn::writecmd().

size_t WvStream::write ( WvBuf inbuf,
size_t  count = INT_MAX 
) [virtual, inherited]

Writes data to the stream from the given buffer.

Returns the actual amount written.

If count is greater than the amount of data available in the buffer, only writes at most that amount.

Implements IWvStream.

Definition at line 477 of file wvstream.cc.

References WvBufBaseCommonImpl< T >::get(), WvBufBaseCommonImpl< T >::unget(), WvBufBaseCommonImpl< T >::used(), and WvStream::write().

size_t WvStream::write ( WvStringParm  s  )  [inline, inherited]

print a preformatted WvString to the stream.

see the simple version of write() way up above.

Definition at line 538 of file wvstream.h.

References WvFastString::cstr(), and WvStream::write().

Referenced by WvStream::write().

void WvStream::outbuf_limit ( size_t  size  )  [inline, virtual, inherited]

set the maximum size of outbuf, beyond which a call to write() will return 0.

I need to do this for tape backups, since all I can do is write to the loopback as fast as I can, which causes us to run out of memory and get SIGABRT'd. (dcoombs: 12/15/2000)

FIXME: there must be a better way. This confuses the semantics of write(); can you trust it to always write all the bytes, or not?

Implements IWvStream.

Definition at line 129 of file wvstream.h.

void WvStream::noread (  )  [virtual, inherited]

Shuts down the reading side of the stream.

This is the opposite of nowrite(), but the name is actually slightly misleading; subsequent calls to read() *might not* fail; rather, if the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

After noread(), if the read buffer (if any"el" f the other end of the connection tries to write to us, they should fail.

Af