]> git.sesse.net Git - cubemap/blobdiff - client.cpp
Support Metacube _output_. Required splitting HTTP headers from stream headers, which...
[cubemap] / client.cpp
index bb2d26cdcd4abec4516d23ae92142636a33ac341..28e1f068550e30e8da2492599401d135e2db109b 100644 (file)
@@ -67,6 +67,7 @@ Client::Client(const ClientProto &serialized, Stream *stream)
                if (fwmark != 0) {
                        log_perror("setsockopt(SO_MARK)");
                }
+               fwmark = 0;
        }
 }
 
@@ -91,7 +92,13 @@ ClientProto Client::serialize() const
 ClientStats Client::get_stats() const
 {
        ClientStats stats;
-       stats.stream_id = stream_id;
+       if (stream_id.empty()) {
+               stats.stream_id = "-";
+       } else {
+               stats.stream_id = stream_id;
+       }
+       stats.sock = sock;
+       stats.fwmark = fwmark;
        stats.remote_addr = remote_addr;
        stats.connect_time = connect_time;
        stats.bytes_sent = bytes_sent;