From 4a2dd17aa0601fffd42f2ec1c92c6a1b79f648d3 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 15 Feb 2013 20:53:16 +0200 Subject: work on client started (services retrieving implemented) server services packet handling implemented --- proto_lib/packet.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'proto_lib/packet.cpp') diff --git a/proto_lib/packet.cpp b/proto_lib/packet.cpp index 8dc1b12..c4c5da0 100644 --- a/proto_lib/packet.cpp +++ b/proto_lib/packet.cpp @@ -349,4 +349,14 @@ svc_cmd packet::serv_extract_command(packet& p) return c; } +unsigned char *packet::buf() +{ + if(data.empty()) + return NULL; + unsigned char *b = new unsigned char [data.size()]; + for(size_t i = 0; i < data.size(); i ++) + b[i] = data[i]; + return b; +} + }; -- cgit v1.2.3