- inlen = recv(c->socket, inbuf, sizeof inbuf, 0);
+ if(c->tcplen) {
+ if(length != c->tcplen)
+ return false;
+ receive_tcppacket(mesh, c, request, length);
+ c->tcplen = 0;
+ return true;
+ }
+
+ /* Change newline to null byte, just like non-SPTPS requests */
+
+ if(request[length - 1] == '\n')
+ request[length - 1] = 0;
+
+ /* Otherwise we are waiting for a request */
+
+ return receive_request(mesh, c, request);
+}
+
+bool receive_meta(meshlink_handle_t *mesh, connection_t *c) {
+ int inlen;
+ char inbuf[MAXBUFSIZE];
+
+ inlen = recv(c->socket, inbuf, sizeof(inbuf), 0);