1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 23:26:32 +09:00

Added missing files

This commit is contained in:
lidgren
2010-07-14 10:42:11 +00:00
parent 631b2b33ac
commit f66e0b0bc1
2 changed files with 115 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
using System;
using System.IO;
namespace Lidgren.Network
{
public partial class NetOutgoingMessage : Stream
{
public override bool CanRead { get { return false; } }
public override bool CanSeek { get { return false; } }
public override bool CanWrite { get { return true; } }
public override void Flush()
{
// no op
}
/// <summary>
/// Gets the length of the stream, in bytes
/// </summary>
public override long Length
{
get { return (long)LengthBytes; }
}
public override long Position
{
get
{
throw new NetException("Position in bytes is not relevant since the bit count can vary");
}
set
{
throw new NetException("It's not possible to seek in this message");
}
}
public override int Read(byte[] buffer, int offset, int count)
{
throw new NetException("It's not possible to read from this message");
}
public override long Seek(long offset, SeekOrigin origin)
{
throw new NetException("It's not possible to seek in this message");
}
public override void SetLength(long value)
{
throw new NetException("It's not possible to set the length of this message");
}
}
}