diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..66e60a86 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,16 @@ +FROM debian:stretch + +# RUN yum install -y gcc-c++ make cmake openssl-devel gdb +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update +RUN apt-get -y install g++ +RUN apt-get -y install libssl-dev +RUN apt-get -y install gdb +RUN apt-get -y install screen +RUN apt-get -y install procps +RUN apt-get -y install lsof + +COPY . . + +WORKDIR examples/ws_connect +RUN ["sh", "build_linux.sh"] diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine new file mode 100644 index 00000000..ce720f23 --- /dev/null +++ b/docker/Dockerfile.alpine @@ -0,0 +1,11 @@ +FROM alpine:3.8 + +RUN apk add --no-cache g++ musl-dev make cmake openssl-dev + +COPY . . + +WORKDIR examples/ws_connect +RUN ["sh", "build_linux.sh"] + +EXPOSE 8765 +CMD ["ws_connect"] diff --git a/docker/Dockerfile.centos b/docker/Dockerfile.centos new file mode 100644 index 00000000..ce720f23 --- /dev/null +++ b/docker/Dockerfile.centos @@ -0,0 +1,11 @@ +FROM alpine:3.8 + +RUN apk add --no-cache g++ musl-dev make cmake openssl-dev + +COPY . . + +WORKDIR examples/ws_connect +RUN ["sh", "build_linux.sh"] + +EXPOSE 8765 +CMD ["ws_connect"] diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian new file mode 100644 index 00000000..66e60a86 --- /dev/null +++ b/docker/Dockerfile.debian @@ -0,0 +1,16 @@ +FROM debian:stretch + +# RUN yum install -y gcc-c++ make cmake openssl-devel gdb +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update +RUN apt-get -y install g++ +RUN apt-get -y install libssl-dev +RUN apt-get -y install gdb +RUN apt-get -y install screen +RUN apt-get -y install procps +RUN apt-get -y install lsof + +COPY . . + +WORKDIR examples/ws_connect +RUN ["sh", "build_linux.sh"] diff --git a/docker/Dockerfile.gcc b/docker/Dockerfile.gcc new file mode 100644 index 00000000..411a7db2 --- /dev/null +++ b/docker/Dockerfile.gcc @@ -0,0 +1,8 @@ +FROM gcc:8 + +# RUN yum install -y gcc-c++ make cmake openssl-devel gdb + +COPY . . + +WORKDIR examples/ws_connect +RUN ["sh", "build_linux.sh"] diff --git a/ixwebsocket/IXWebSocketTransport.cpp b/ixwebsocket/IXWebSocketTransport.cpp index 1b4eb0b2..4e7cb795 100644 --- a/ixwebsocket/IXWebSocketTransport.cpp +++ b/ixwebsocket/IXWebSocketTransport.cpp @@ -454,6 +454,7 @@ namespace ix { if (_rxbuf.size() < 2) return; /* Need at least 2 */ const uint8_t * data = (uint8_t *) &_rxbuf[0]; // peek, but don't consume ws.fin = (data[0] & 0x80) == 0x80; + ws.rsv1 = (data[0] & 0x40) == 0x40; ws.opcode = (wsheader_type::opcode_type) (data[0] & 0x0f); ws.mask = (data[1] & 0x80) == 0x80; ws.N0 = (data[1] & 0x7f); diff --git a/ixwebsocket/IXWebSocketTransport.h b/ixwebsocket/IXWebSocketTransport.h index a6936d6a..e2dbbfec 100644 --- a/ixwebsocket/IXWebSocketTransport.h +++ b/ixwebsocket/IXWebSocketTransport.h @@ -98,6 +98,7 @@ namespace ix struct wsheader_type { unsigned header_size; bool fin; + bool rsv1; bool mask; enum opcode_type { CONTINUATION = 0x0,