I’m working on a software i need some help.
I have a client and server. Server will serialize a text file and send it to the client.
My current progress: Client receiving binary array but can’t write it to disc as original text file.
private void ListenPort()
{
TcpListener _TcpListener= new _TcpListener(7381);
byte[] received_binary= new byte[1024];
_TcpListener.Start();
while (true)
{
Socket Soket = _TcpListener.AcceptSocket();
Soket.Receive(received_binary, received_binary.Length, 0);
}
}
Do you need to deserialize it to string? Here is a function I wrote a while ago which may help…