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

Network Information Received #72

Open
hypodyne opened this issue Jan 27, 2019 · 13 comments
Open

Network Information Received #72

hypodyne opened this issue Jan 27, 2019 · 13 comments

Comments

@hypodyne
Copy link

So you connect to a network(Freenode), and it sends back the network information.
251, 252, 253, 254, 255, 265, 266, 250

IrcDotNet throws the NetworkInformationReceived event with the details in e.Comment.

e.Comment sometimes contains a properly formatted string

"There are 109 users and 84695 invisible on 32 servers"

and sometimes e.comment contains a number as a string.

"5"

The event is thrown 5 times out of the 8 responses. The last 3 never throw the event.

The way the Network Information is structured, I can't use sender to get the information, because there is no way to tell which piece of information threw the event.

@wix-andriusb
Copy link

You want to tell me that it splits on 84695 between 8469 and 5 ?

@hypodyne
Copy link
Author

hypodyne commented Feb 3, 2019

I have a wireshark capture, and it seems if the response from the server is incorrect, then IrcDotNet also gets it wrong. Let me post a screenshot.

@hypodyne
Copy link
Author

hypodyne commented Feb 3, 2019

wireshark

Since freenode is sending packets which I presume are longer than the 1024 limit, it gets split in the wrong place. (in wireshark) and IrcDotNet can't handle that either. What happens is 265, 266, 250 don't throw an event. thats item 1.

@hypodyne
Copy link
Author

hypodyne commented Feb 3, 2019

wireshark2

Another issue is that IrcDotNet throws the NetworkInformationReceived event with just 35 as the comment. What it should be is "35 :IRC Operators online". Without that extra info there is no telling which of the 7 different network information properties it comes from.

@txdv
Copy link
Contributor

txdv commented Feb 4, 2019

So the issues here are:

  • If the server sends a response with > 1024 bytes, it gets split in the wrong place.
  • Event 252 (RPL_LUSEROP) has an integer field and some additional info

Is that correct?

The first one seems to be offspec, since the returned message can be only a certain size ... But we live nowadays with so much ubiquitous memory, I think we could use System.IO.Pipelines to actually address this. That library would resize the used buffers automatically for us, also the most simple example for it literally just read lines (ending with \n)

Here is a nice list of events https://www.alien.net.au/irc/irc2numerics.html

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

Yes, that is what I think is happening.

A few network information events return an int (and that is all they return) in e.Comment.

Really all events should be returning enough information so that you can post the response.

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

Yes here is one too http://www.networksorcery.com/enp/protocol/irc.htm

Notice 252

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

16

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

34

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

73

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

16, 34, 73 What do they mean. Without context they are useless.

@txdv
Copy link
Contributor

txdv commented Feb 4, 2019

This is not IRC, try to add all comments in one response :D
Also do you know what all of the meanings of the integer parameter in notice 252 are? Maybe there is a source which describes them?

I think you are right that events in the library should contain everything that is needed, its just that in open source usually something happens when someone needs it or makes an issue out of what he dislikes about a certain library.

@hypodyne
Copy link
Author

hypodyne commented Feb 4, 2019

Just letting you guys know. It's not important at all.

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

3 participants