diff options
Diffstat (limited to 'dotnet/Qpid.Client.Transport.Socket.Blocking')
| -rw-r--r-- | dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs b/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs index c2732a0ce1..d65b5e9e6a 100644 --- a/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs +++ b/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs @@ -71,7 +71,7 @@ namespace Qpid.Client.Transport.Socket.Blocking { try { - _networkStream.Write(byteBuffer.ToByteArray(), byteBuffer.Position, byteBuffer.Limit); + _networkStream.Write(byteBuffer.array(), byteBuffer.position(), byteBuffer.limit()); // FIXME } catch (Exception e) { @@ -87,9 +87,10 @@ namespace Qpid.Client.Transport.Socket.Blocking int numOctets = _networkStream.Read(bytes, 0, bytes.Length); - ByteBuffer byteBuffer = HeapByteBuffer.wrap(bytes, numOctets); + ByteBuffer byteBuffer = ByteBuffer.wrap(bytes); + byteBuffer.limit(numOctets); - byteBuffer.Flip(); + byteBuffer.flip(); return byteBuffer; } |
