supercoeus / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 1 forks source link

SocketException: The socket is not connected Error. #149

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.While connecting

Hi, i trying to use with mono in CentOs, but I always receive the error:

System.Net.Sockets.SocketException: The socket is not connected
  at System.Net.Sockets.Socket.Shutdown (SocketShutdown how) [0x00042] in
/downloads/mono-2.4.2.3/mcs/class/System/System.Net.Sockets/Socket.cs:3657
  at MSNPSharp.Core.SocketMessageProcessor.Disconnect () [0x00000]
  at MSNPSharp.NSMessageProcessor.Disconnect () [0x00000]
  at MSNPSharp.NSMessageHandler.OnXFRReceived (MSNPSharp.Core.NSMessage
message) [0x00000]
  at MSNPSharp.NSMessageHandler.HandleMessage (IMessageProcessor sender,
MSNPSharp.Core.NetworkMessage message) [0x00000]

The code runs OK in Windows. Is just a few tests.
Tried with 3.0,3.0RC and 3.5(that last don't even compile).

I using the mono 2.4.2.3(tried also with the 2.4.0)

Original issue reported on code.google.com by bydarkh...@gmail.com on 15 Oct 2009 at 1:08

GoogleCodeExporter commented 8 years ago
Hi,

You said 3.5 can't compile in Mono? Would you please to tell us what's the 
compile 
error?

Original comment by freezing...@gmail.com on 15 Oct 2009 at 4:19

GoogleCodeExporter commented 8 years ago
I've commit r1326, please checkout the 3.0 version in 
branches/MSNPSHARP_30_STABLE 
folder and test.

Original comment by freezing...@gmail.com on 15 Oct 2009 at 5:31

GoogleCodeExporter commented 8 years ago
Hi, I tried again with 3.0v but received the same error in 
Nameserver.ExceptionOccurred.

And the error when i compile the 3.5v:

./P2P/P2PApplication.cs(110,17): error CS0118:
`MSNPSharp.P2P.P2PApplication.P2PSession' is a `property' but a `type' was 
expected
./P2P/P2PApplication.cs(141,34): error CS0118:
`MSNPSharp.P2P.P2PApplication.P2PSession' is a `property' but a `type' was 
expected
./P2P/P2PApplication.cs(228,16): error CS0118:
`MSNPSharp.P2P.P2PApplication.P2PSession' is a `property' but a `type' was 
expected
./P2P/P2PApplication.cs(270,64): error CS0246: The type or namespace name
`P2PAckHandler' could not be found. Are you missing a using directive or an 
assembly
reference?
Compilation failed: 4 error(s), 0 warnings

Thanks

Original comment by bydarkh...@gmail.com on 15 Oct 2009 at 3:46

GoogleCodeExporter commented 8 years ago
Please exclude P2PApplication.cs from your mono project... There is no such 
file in
project file (MSNPSharp.csproj)...

Original comment by hepha...@gmail.com on 15 Oct 2009 at 4:14

GoogleCodeExporter commented 8 years ago
hi, i compiled successfully the 3.5 version, but receive the same error.
is in line 1767 of file NSMessageHandler.cs

the trace log is in attachment.

Original comment by bydarkh...@gmail.com on 15 Oct 2009 at 6:14

GoogleCodeExporter commented 8 years ago
Hi, I fix it. I just changed the way of check to see if the socket is atived. 
check
the patch.

tested only on mono(CentOs)

Thanks for everything.

Original comment by bydarkh...@gmail.com on 15 Oct 2009 at 7:25

GoogleCodeExporter commented 8 years ago
Please do not use the code in branches/MSNPAHSARP_NEWP2PFEATURE use 
branches/MSNPSHARP_30_STABLE instead.

Original comment by freezing...@gmail.com on 16 Oct 2009 at 4:13

GoogleCodeExporter commented 8 years ago
Hi,
I found your patch is based on the code in trunk.
So you've try the new 3.0 and it still has the same problem? It means that 
socket.Send(new byte[0], 0, 0); not work in Mono at all?

Could you please test with the 3.0 and generate a patch on it?

Original comment by freezing...@gmail.com on 16 Oct 2009 at 4:21

GoogleCodeExporter commented 8 years ago
Ok, just try this version, I've merged your patch in it!

Original comment by freezing...@gmail.com on 16 Oct 2009 at 5:04

GoogleCodeExporter commented 8 years ago
yes, also work in 3.0 now.

Original comment by bydarkh...@gmail.com on 16 Oct 2009 at 8:05

GoogleCodeExporter commented 8 years ago
Hi,

Now this issue will be closed, I appreciate your contribution to the MSNPSharp 
project!

Original comment by freezing...@gmail.com on 16 Oct 2009 at 9:10

GoogleCodeExporter commented 8 years ago

Original comment by hepha...@gmail.com on 30 Oct 2009 at 4:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi,

The current trunk does not seem to have had bydarkhero's fix applied verbatim. 
Unfortunately the fix that has been applied has not resolved this issue.

ByDarkHero's fix does seem to work. Perhaps this could be applied to the trunk? 
:)

Original comment by james.fr...@gmail.com on 7 Feb 2010 at 9:20

GoogleCodeExporter commented 8 years ago
Ok, I adopt his solution. You guys need to follow your issues.

Original comment by freezing...@gmail.com on 8 Feb 2010 at 6:48

GoogleCodeExporter commented 8 years ago

Original comment by freezing...@gmail.com on 10 Apr 2010 at 8:54

GoogleCodeExporter commented 8 years ago

Original comment by hepha...@gmail.com on 20 Sep 2010 at 10:40