I have a need to implement socket-to-server communication in
I have a need to implement socket-to-server communication in
I discovered that the problem was in the component I was using in delphi to create the server, I switched the TcpServer component to the SocketServer both from the Internet palette, the code was pretty much the same,
sRequisicao := Socket.ReceiveText;
Socket.SendText(sRequisicao);
And in the csharp part for ease I used the Socket package that made it easier to use
using (var socket = new ConnectedSocket("127.0.0.1", 6500))
{
socket.Send("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><reserva><valor>10</valor></reserva>");
var data = socket.Receive();
Console.WriteLine(data);
}