Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading buffer fails #2

Open
Pavel199 opened this issue Feb 12, 2014 · 0 comments
Open

Reading buffer fails #2

Pavel199 opened this issue Feb 12, 2014 · 0 comments

Comments

@Pavel199
Copy link

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);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant