Skip to content

Reading buffer fails  #2

@Pavel199

Description

@Pavel199

Trouble with SLPolicyServerReceiver (Log2Console / src / Log2Console / Receiver / SLPolicyServerReceiver.cs)

What's the meaning of reading operation here? Reading buffer fails with the IO-exception

void ProcessRequest(Socket socket)
{
using (var client = new TcpClient { Client = socket, ReceiveTimeout = 5000 })
using (var s = client.GetStream())
{
var buffer = new byte[PolicyRequestString.Length];
s.Read(buffer, 0, buffer.Length);
s.Write(_policy, 0, _policy.Length);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions