diff options
author | Mark Spruiell <mes@zeroc.com> | 2016-02-18 12:18:46 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2016-02-18 12:18:46 -0800 |
commit | 0da776d5f307fc007c0ef3340d16387096d9c1c2 (patch) | |
tree | 12f56c9eb624010b0a9c04871175a543adf84667 /csharp/src/Ice/EndpointFactoryManager.cs | |
parent | Fixed AMI bug where exception wasn't called if response callback was null, ad... (diff) | |
download | ice-0da776d5f307fc007c0ef3340d16387096d9c1c2.tar.bz2 ice-0da776d5f307fc007c0ef3340d16387096d9c1c2.tar.xz ice-0da776d5f307fc007c0ef3340d16387096d9c1c2.zip |
ICE-6861 - C# stream changes
Diffstat (limited to 'csharp/src/Ice/EndpointFactoryManager.cs')
-rw-r--r-- | csharp/src/Ice/EndpointFactoryManager.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/csharp/src/Ice/EndpointFactoryManager.cs b/csharp/src/Ice/EndpointFactoryManager.cs index 1f52ffeb605..e38348af375 100644 --- a/csharp/src/Ice/EndpointFactoryManager.cs +++ b/csharp/src/Ice/EndpointFactoryManager.cs @@ -142,16 +142,16 @@ namespace IceInternal // and ask the factory to read the endpoint data from that stream to create // the actual endpoint. // - BasicStream bs = new BasicStream(instance_, Ice.Util.currentProtocolEncoding); - bs.writeShort(ue.type()); - ue.streamWrite(bs); - Buffer buf = bs.getBuffer(); - buf.b.position(0); - buf.b.limit(buf.size()); - bs.readShort(); // type - bs.startReadEncaps(); - EndpointI e = factory.read(bs); - bs.endReadEncaps(); + Ice.OutputStream os = new Ice.OutputStream(instance_, Ice.Util.currentProtocolEncoding); + os.writeShort(ue.type()); + ue.streamWrite(os); + Ice.InputStream iss = + new Ice.InputStream(instance_, Ice.Util.currentProtocolEncoding, os.getBuffer(), true); + iss.pos(0); + iss.readShort(); // type + iss.startEncapsulation(); + EndpointI e = factory.read(iss); + iss.endEncapsulation(); return e; } return ue; // Endpoint is opaque, but we don't have a factory for its type. @@ -160,7 +160,7 @@ namespace IceInternal return null; } - public EndpointI read(BasicStream s) + public EndpointI read(Ice.InputStream s) { lock(this) { @@ -169,7 +169,7 @@ namespace IceInternal EndpointFactory factory = get(type); EndpointI e = null; - s.startReadEncaps(); + s.startEncapsulation(); if(factory != null) { @@ -180,7 +180,7 @@ namespace IceInternal e = new OpaqueEndpointI(type, s); } - s.endReadEncaps(); + s.endEncapsulation(); return e; } |