@@ -56,28 +56,28 @@ namespace RabbitMQ.Client.Impl {
56
56
public class Command {
57
57
private static readonly byte [ ] m_emptyByteArray = new byte [ 0 ] ;
58
58
59
- // EmptyContentBodyFrameSize , 8 = 1 + 2 + 4 + 1
59
+ // EmptyFrameSize , 8 = 1 + 2 + 4 + 1
60
60
// - 1 byte of frame type
61
61
// - 2 bytes of channel number
62
62
// - 4 bytes of frame payload length
63
63
// - 1 byte of payload trailer FrameEnd byte
64
- public const int EmptyContentBodyFrameSize = 8 ;
64
+ public const int EmptyFrameSize = 8 ;
65
65
66
66
static Command ( ) {
67
- CheckEmptyContentBodyFrameSize ( ) ;
67
+ CheckEmptyFrameSize ( ) ;
68
68
}
69
69
70
- public static void CheckEmptyContentBodyFrameSize ( ) {
70
+ public static void CheckEmptyFrameSize ( ) {
71
71
Frame f = new Frame ( CommonFraming . Constants . FrameBody , 0 , m_emptyByteArray ) ;
72
72
MemoryStream stream = new MemoryStream ( ) ;
73
73
NetworkBinaryWriter writer = new NetworkBinaryWriter ( stream ) ;
74
74
f . WriteTo ( writer ) ;
75
75
long actualLength = stream . Length ;
76
76
77
- if ( EmptyContentBodyFrameSize != actualLength ) {
78
- string message =
79
- string . Format ( "EmptyContentBodyFrameSize is incorrect - defined as {0} where the computed value is in fact {1}." ,
80
- EmptyContentBodyFrameSize ,
77
+ if ( EmptyFrameSize != actualLength ) {
78
+ string message =
79
+ string . Format ( "EmptyFrameSize is incorrect - defined as {0} where the computed value is in fact {1}." ,
80
+ EmptyFrameSize ,
81
81
actualLength ) ;
82
82
throw new ProtocolViolationException ( message ) ;
83
83
}
@@ -159,7 +159,7 @@ public void Transmit(int channelNumber, ConnectionBase connection) {
159
159
int frameMax = ( int ) Math . Min ( int . MaxValue , connection . FrameMax ) ;
160
160
int bodyPayloadMax = ( frameMax == 0 )
161
161
? body . Length
162
- : frameMax - EmptyContentBodyFrameSize ;
162
+ : frameMax - EmptyFrameSize ;
163
163
for ( int offset = 0 ; offset < body . Length ; offset += bodyPayloadMax ) {
164
164
int remaining = body . Length - offset ;
165
165
0 commit comments