Skip to content

Commit 900f1e1

Browse files
author
Mark
committed
changed VelocyStream communication (send protocol header)
1 parent a3f1e25 commit 900f1e1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v4.1.0 (2016-10-xx)
2+
---------------------------
3+
* changed VelocyStream communication (send protocol header)
4+
15
v4.0.0 (2016-10-17)
26
---------------------------
37
* replaced API

src/main/java/com/arangodb/internal/velocystream/Connection.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
public abstract class Connection {
5050

5151
private static final Logger LOGGER = LoggerFactory.getLogger(Connection.class);
52-
private static final byte[] ACCEPT_HEADER = ByteBuffer.wrap("VST/1.0\r\n\r\n".getBytes())
53-
.order(ByteOrder.LITTLE_ENDIAN).array();
52+
private static final byte[] PROTOCOL_HEADER = "VST/1.0\r\n\r\n".getBytes();
5453

5554
private final String host;
5655
private final Integer port;
@@ -111,7 +110,7 @@ public synchronized void open() throws IOException {
111110
}
112111
((SSLSocket) socket).startHandshake();
113112
}
114-
sendAcceptHeader();
113+
sendProtocolHeader();
115114
}
116115

117116
public synchronized void close() {
@@ -127,8 +126,8 @@ public synchronized void close() {
127126
}
128127
}
129128

130-
private void sendAcceptHeader() throws IOException {
131-
outputStream.write(ACCEPT_HEADER);
129+
private void sendProtocolHeader() throws IOException {
130+
outputStream.write(PROTOCOL_HEADER);
132131
outputStream.flush();
133132
}
134133

0 commit comments

Comments
 (0)