/*
....[@@@..[@@@..............[@.................. MUD++ is a written from
....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and
....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++.
....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing
....[@......[@..[@@@@@..[@@@@@.................. development project. All
................................................ contributions are welcome.
....Copyright(C).1995.Melvin.Smith.............. Enjoy.
------------------------------------------------------------------------------
Melvin Smith (aka Fusion) msmith@hom.net
MUD++ development mailing list mudpp@van.ml.org
------------------------------------------------------------------------------
iosock.cpp
*/
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include "config.h"
#include "socket.h"
#include "io.h"
void OutputSocket::flush()
{
if ( ptr == buf )
return;
sock->write( buf, ptr - buf );
ptr = buf;
}
void OutputSocket::largewrite( const void * x, size_t len )
{
if ( ptr != buf )
sock->write(buf, ptr - buf );
sock->write((const char *)x, len );
ptr = buf;
}