Search found 14 matches

by derdude
Thu Oct 19, 2017 6:14 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

Any other thought?
I did not open this topic because I want my program to work, but because the part of the server which processes the RCON-data might be seriously flawed.
by derdude
Mon Oct 16, 2017 5:00 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

So the question is, does the implementation of Send used implicitly set the PUSH flag with every call?
Most implementations set the PUSH flag on each segment after coalescing data supplied by send(). However, this flag is not intended for marking the end of records, as stated within the RFC and ...
by derdude
Sun Oct 15, 2017 7:47 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

I printed the data in hex before send()ing them.
The data is definitely correct and the bug can always be reproduced by changing the buffer's size of my streambuf-object, in which the bytes are stored before send()ing them, to something very small. I'm pretty sure it is a bug in Factorio.
In case ...
by derdude
Sun Oct 15, 2017 9:03 am
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

No, there are no additional characters.
by derdude
Sat Oct 14, 2017 9:59 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

Well, that's what I said.
by derdude
Sat Oct 14, 2017 8:46 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

The program sends valid RCON packets over the TCP stream.
by derdude
Sat Oct 14, 2017 5:02 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

So we agree that the server has to read from the TCP stream until it can assemble a valid RCON-packet?
by derdude
Sat Oct 14, 2017 10:00 am
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [15.35] issues with RCON over TCP

<ABCD> and <EFGH> are effectively different streams and it doesn't matter what order they're discharged from the TCP layer to the application layer.
Your < and > don't make sense as TCP does not operate with packets (See above link to RFC). ABCD will always be sent and received before EFGH.


if ...
by derdude
Fri Oct 13, 2017 5:22 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: [0.15.35, build 30897, linux64] issues with RCON over TCP

TCP is not message/packet/record oriented. Data can be written at one end into the stream and read from another, like pipes. See https://tools.ietf.org/html/rfc1180#page-24.
JohnyDL wrote: It might even send the <ABCD> and <EFGH> up to the application layer in a different order
That's not correct.
by derdude
Fri Oct 13, 2017 4:15 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: issues with RCON over TCP

That's not how send works. You are sending 9 2-byte packets
TCP is stream oriented. https://linux.die.net/man/7/tcp
TCP does not preserve record boundaries.

Multiple calls to send() may be split or merged. https://stackoverflow.com/questions/17446491/tcp-stream-vs-udp-message

There is no ...
by derdude
Fri Oct 13, 2017 3:48 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: issues with RCON over TCP

Okay, let's explicate :)

I am programming with C++ using the WinSock API on Windows or POSIX sockets on Linux for communication over TCP. To use a convenient stream-interface, I decided to create a strembuffer which can be written to or read from. The streambuffer manages to, well, buffer outgoing ...
by derdude
Fri Oct 13, 2017 10:43 am
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: issues with RCON over TCP

This is the logging output when connecting and sending the RCON authentication-packet in pieces of two bytes at maximum:

52.586 Info RemoteCommandProcessor.cpp:230: New RCON connection from <IPv4-Address>:49055
52.587 Error RemoteCommandProcessor.cpp:322: Couldn't parse RCON data: Couldn't read ...
by derdude
Fri Oct 13, 2017 8:34 am
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

Re: issues with RCON over TCP

isn't this a bug not an idea/suggestion?
My bad, I somehow overlooked the bug-subforum.

you might want those log files available to the devs too
The log file merely contains "Couldn't parse RCON data: Couldn't read from input file. File could be corrupted."
Edit: and something along "client ...
by derdude
Thu Oct 12, 2017 8:34 pm
Forum: Technical Help
Topic: [15.35] issues with RCON over TCP
Replies: 28
Views: 10145

[15.35] issues with RCON over TCP

Hey developers :)

I was programming some RCON client to connect to a factorio server's remote console.
The program didn't write RCON-packets at one go but rather piecewise to the TCP buffer. Subsequently the server writes something along 'Couldn't parse RCON data: Couldn't read from input file ...

Go to advanced search