Forum > Networking and Web Programming
LNet problems
Jishaxe:
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: ---Shutdown error [107]: Transport endpoint is not connected
--- End code ---
and
--- Code: ---Get error [104]: Connection reset by peer
--- End code ---
I 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
fabienwang:
What port do you connect to?
Does your machine listen to that port? (I.E. 80 => apache2 running?)
Jishaxe:
--- Quote from: FabienWang 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?)
--- End quote ---
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 existsSo I don't think that's the problem, but anyway, I usually open port 20 on my computer via
--- Code: ---sudo netcat -l 20
--- End code ---
or 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.
Almindor:
--- Quote from: Jishaxe 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: ---Shutdown error [107]: Transport endpoint is not connected
--- End code ---
and
--- Code: ---Get error [104]: Connection reset by peer
--- End code ---
I 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
--- End quote ---
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:
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
Navigation
[0] Message Index
[#] Next page