1234567891011121314151617181920212223242526272829303132333435363738394041 |
- PROTO_ROOT = ""
- package.loaded[PROTO_ROOT .. "struct_client"] = nil
- package.loaded[PROTO_ROOT .. "socket_client"] = nil
- package.loaded[PROTO_ROOT .. "http_client"] = nil
- local struct_client = require(PROTO_ROOT .. "struct_client")
- local socket_client = require(PROTO_ROOT .. "socket_client")
- local http_client = require(PROTO_ROOT .. "http_client")
- local sprotoparser = require(PROTO_ROOT .. "sprotoparser")
- local proto = {}
- -- socket
- proto.socket = {
- c2s = struct_client .. socket_client.c2s,
- s2c = struct_client .. socket_client.s2c
- }
- proto.c2s = sprotoparser.parse(proto.socket.c2s)
- proto.s2c = sprotoparser.parse(proto.socket.s2c)
- -- proto.host_c2s = proto.c2s:host("package")
- -- proto.host_s2c = proto.s2c:host("package")
- -- proto.fc2s_Request = proto.host_s2c:attach(proto.c2s)
- -- http
- proto.http = {
- c2s = struct_client .. http_client.c2s,
- s2c = struct_client .. http_client.s2c
- }
- proto.http_c2s = sprotoparser.parse(proto.http.c2s)
- proto.http_s2c = sprotoparser.parse(proto.http.s2c)
- -- proto.httpHost_c2s = proto.http_c2s:host("package")
- -- proto.httpHost_s2c = proto.http_s2c:host("package")
- -- proto.httpc2s_Request = proto.httpHost_s2c:attach(proto.http_c2s)
- return proto
|