Recent

Author Topic: LNet problems  (Read 8258 times)

Jishaxe

  • Full Member
  • ***
  • Posts: 103
  • Hobbist Programmer
LNet problems
« on: April 11, 2011, 04:21:56 pm »
Hello people.
I post here today to ask for help with a problem I'm having.
I'm coding some software that connects to a host using TCP with LNet, then sends a number of messages via SendMessage at a very fast speed.
Code: [Select]
Shutdown error [107]: Transport endpoint is not connected and
Code: [Select]
Get error [104]: Connection reset by peerI get these errors from the onError event, and I can't send any more. I'd like to know how they are caused and what they mean so I can catch them and explain them to the users.
I don't get this error if I open a port on my own computer and connect to localhost, but I do when doing it to a website I get these errors. I assume it has something to do with the webserver rejecting it or something.
Thanks in advance.
- Jishaxe
« Last Edit: April 11, 2011, 07:22:02 pm by Jishaxe »
Linux Mint 12
Windows 7 Home Premium
______________________
Definition of programmer: An organism that converts caffeine into software.

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
Re: LNet problems
« Reply #1 on: April 11, 2011, 04:34:42 pm »
What port do you connect to?
Does your machine listen to that port? (I.E. 80 => apache2 running?)
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

Jishaxe

  • Full Member
  • ***
  • Posts: 103
  • Hobbist Programmer
Re: LNet problems
« Reply #2 on: April 11, 2011, 07:02:59 pm »
What port do you connect to?
Does your machine listen to that port? (I.E. 80 => apache2 running?)
Hello FabienWang,
I am pretty sure that it actually establishes a connection before it sends these messages, because
  • The onConnection event is fired
  • The SendMessage command only happens if a connected socket exists
So I don't think that's the problem, but anyway, I usually open port 20 on my computer via
Code: [Select]
sudo netcat -l 20or something like that, but if I am connected to a website then port 80 of course.
Just to clarify, when I connect to my own computer it's only for testing. I don't run a webserver.
« Last Edit: April 11, 2011, 07:22:42 pm by Jishaxe »
Linux Mint 12
Windows 7 Home Premium
______________________
Definition of programmer: An organism that converts caffeine into software.

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
Re: LNet problems
« Reply #3 on: April 11, 2011, 09:09:55 pm »
Hello people.
I post here today to ask for help with a problem I'm having.
I'm coding some software that connects to a host using TCP with LNet, then sends a number of messages via SendMessage at a very fast speed.
Code: [Select]
Shutdown error [107]: Transport endpoint is not connected and
Code: [Select]
Get error [104]: Connection reset by peerI get these errors from the onError event, and I can't send any more. I'd like to know how they are caused and what they mean so I can catch them and explain them to the users.
I don't get this error if I open a port on my own computer and connect to localhost, but I do when doing it to a website I get these errors. I assume it has something to do with the webserver rejecting it or something.
Thanks in advance.
- Jishaxe

These errors are usually reported when the other side simply crashed, or otherwise closed connection in a "bad" way. You said you use TCP but you also mention HTTP. Which protocol do you use? What is the server?

Also how do you send "fast"? :D

Jishaxe

  • Full Member
  • ***
  • Posts: 103
  • Hobbist Programmer
Re: LNet problems
« Reply #4 on: April 11, 2011, 09:43:04 pm »
Almindor2:
Ah okay, now that I know what that means I can explain to the user what's wrong, so thanks.
The server I would connect to would be www.example.com or Google or something. I connect to port 80 through TCP, not because I want to use HTTP, but because port 80 is usually the only open port on a website.
If you check out my software's project page, Floody, in my signature then you'll understand what I mean and why it connects to web servers like that :L
Linux Mint 12
Windows 7 Home Premium
______________________
Definition of programmer: An organism that converts caffeine into software.

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
Re: LNet problems
« Reply #5 on: April 11, 2011, 10:50:53 pm »
It's quite possible that a "security" extension on the http server blocks you off after a few attempts (especially if you don't send valid HTTP requests and headers) to prevent DDOS.

That'd explain why the disconnect is "forced" on you.

Jishaxe

  • Full Member
  • ***
  • Posts: 103
  • Hobbist Programmer
Re: LNet problems
« Reply #6 on: April 11, 2011, 10:52:16 pm »
Ah okay brilliant, thank you.
Linux Mint 12
Windows 7 Home Premium
______________________
Definition of programmer: An organism that converts caffeine into software.

 

TinyPortal © 2005-2018