message: Update test_server.c
diff: @@ -97,12 +97,17 @@ int my_onReceive(swServer *serv, swEventData *req)
  g_receive_count++;
  - swConnection *conn = swWorker_get_connection(serv, req->info.fd);
  - swoole_rtrim(req->data, req->info.len);
  - swNotice("onReceive[%d]: ip=%s|port=%d Data=%s|Len=%d", g_receive_count, swConnection_get_ip(conn),
  - swConnection_get_port(conn), req->data, req->info.len);
  + swPackagePtr *req_pkg = (swPackagePtr *)req;
  + swConnection *conn = swWorker_get_connection(serv, req_pkg->info.fd);
  +
  + swoole_rtrim(req_pkg->data.str, req_pkg->data.length);
  + swNotice("onReceive[%d]: ip=%s|port=%d Data=%s|Len=%d", g_receive_count,
  + swConnection_get_ip(conn), swConnection_get_port(conn),
  + req_pkg->data.str, req_pkg->data.length);
  +
  + int n = sw_snprintf(resp_data, SW_IPC_BUFFER_SIZE, "Server: %.*s\n",
  + req_pkg->data.length, req_pkg->data.str);
  - int n = sw_snprintf(resp_data, SW_IPC_BUFFER_SIZE, "Server: %.*s\n", req->info.len, req->data);
  ret = serv->send(serv, req->info.fd, resp_data, n);
  if (ret < 0)
  {
  