Commit a771a265 authored by Brayan Sarmiento's avatar Brayan Sarmiento
Browse files

Obtener Xml Formateado

parent b7dc25ca
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Xml.Linq;
using EvaPosSCOSrv;
using Serilog;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace gatewaySCO.POSBC;
......@@ -83,7 +85,7 @@ public class ClienteServidorPOSBC(string ip, int pto)
_contadorMensajesEnviados++;
Log.Information("Mensaje #{contador} para POSBIC {ip} - {msj}", _contadorMensajesEnviados, _ip, bytesMensaje.ToString);
Log.Information("Esperando respuesta..");
// Leer la respuesta del servidor
byte[] buffer = new byte[1024]; // Tamaño del buffer inicial
int totalBytesRead = 0;
......@@ -106,6 +108,7 @@ public class ClienteServidorPOSBC(string ip, int pto)
bufferEntrada = ms.ToArray();
}
_contadorMensajesRecibidos++;
string result = Encoding.UTF8.GetString(bufferEntrada);
Log.Debug("Respuesta #{contador} de POSBC {ip} - {msj}", _contadorMensajesRecibidos, _ip, bufferEntrada.ToString);
return bufferEntrada;
......
......@@ -4,14 +4,14 @@
"POS_comment": "Indicates the set of commands to instantiate, according to the type of POS: evapos, tests, gk, etc.",
"IpGateway": "127.0.0.1",
"IpGateway_comment": "Gateway IP, local or remote",
"PortGateway": 6697,
"PortGateway": 6690,
"PortGateway_comment": "Gateway IP Port",
"Language": "es",
"Language_comment": "Language code as needed by the POS application"
},
"POSBC": {
"IpPOSBC": "127.0.0.1",
"PortPOSBC": 6698
"PortPOSBC": 6697
},
"DataGK": {
"IpGkSmartPOS": "10.10.117.10",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment