lidgren / lidgren-network-gen3

Lidgren Network Library
https://groups.google.com/forum/#!forum/lidgren-network-gen3
MIT License
1.19k stars 331 forks source link

Operation on non-blocking socket would block #29

Open pax83 opened 9 years ago

pax83 commented 9 years ago

Is this issue fixed in last version of library? We use last year's version of the library.

lidgren commented 9 years ago

I'm not aware of such an issue currently. Can you describe your problem more thoroughly?

pax83 commented 9 years ago

Somtimes we receive next warning message:

WarningMessage: Socket exception: System.Net.Sockets.SocketException: Operation on non-blocking socket would block
  at System.Net.Sockets.Socket.ReceiveFrom_nochecks_exc (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint& remote_end, Boolean throwOnError, System.Int32& error) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.ReceiveFrom_nochecks (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint& remote_end) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.ReceiveFrom (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags, System.Net.EndPoint& remoteEP) [0x00000] in <filename unknown>:0 
  at Lidgren.Network.NetPeer.Heartbeat () [0x00000] in <filename unknown>:0 

And many warning messages

WarningMessage: Received unhandled library message Acknowledge from xxx.xxx.xxx.xxx:xxxxx
pax83 commented 9 years ago

Once we tried to upgrade to the latest version of the library, but the problems become greater. And we rollback it. What is the most stable version of the library?

AgentFire commented 9 years ago

@pax83 please provide a small project which reproduces the issue.

LinkSpaceGame commented 8 years ago

Error]:Exception:{0} {1}This platform is not supported at System.Collections.Generic.RBTree..ctor (System.Object hlp) [0x00000] in :0 at System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties () [0x00000] in :0 at Lidgren.Network.NetUtility.GetNetworkInterface () [0x00000] in :0 at Lidgren.Network.NetUtility.GetBroadcastAddress () [0x00000] in :0 at Lidgren.Network.NetPeerConfiguration..ctor (System.String appIdentifier) [0x00000] in :0 at DashFire.Network.NetworkSystem.Init () [0x00000] in :0 at DashFire.GameControler.InitLogic () [0x00000] in :0 at GameLogic.StartLogic () [0x00000] in :0 at GameLogic+c__Iterator25.MoveNext () [0x00000] in :0

I use the lidgren Mac 5.1.2 unity platform has been a problem

LinkSpaceGame commented 8 years ago

I use the last version

LinkSpaceGame commented 8 years ago

help me

lidgren commented 8 years ago

Defined "CONSTRAINED" for your project.

lidgren commented 8 years ago

Hmm... markup screws me... it's underscore, underscore, CONSTRAINED, underscore, underscore

LinkSpaceGame commented 8 years ago

My platform is ios 9.1 I have modified the "CONSTRAINED" Unity_IOS, but installed to the apple phone Is also an error

lidgren commented 8 years ago

I've never tested the library on IOS; so please post back any fixes and changes necessary you find.

LinkSpaceGame commented 8 years ago

I have tried PlatformConstrained.cs andPlatformWin32.cs

[Error]:LobbyNetworkSystem.OnError Exception:Operation on non-blocking socket would block at System.Collections.Generic.RBTree..ctor (System.Object hlp) [0x00000] in :0 at System.Net.Sockets.SocketException..ctor (Int32 error) [0x00000] in :0 at System.Net.Sockets.Socket.EndReceive (IAsyncResult asyncResult, SocketError& errorCode) [0x00000] in :0 at System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x00000] in :0 at SuperSocket.ClientEngine.AsyncTcpSession.MyReceiveCallback (IAsyncResult ar) [0x00000] in :0 at System.Net.Sockets.Socket+SocketAsyncResult.Complete () [0x00000] in :0 DashFire.GfxSystem:TickImpl() DashFire.GfxSystem:Tick() DashFire.GameControler:TickGame() GameLogic:Update()

LinkSpaceGame commented 8 years ago

I have tried PlatformConstrained.cs andPlatformWin32.cs

[Error]:LobbyNetworkSystem.OnError Exception:Operation on non-blocking socket would block at System.Collections.Generic.RBTree..ctor (System.Object hlp) [0x00000] in :0 at System.Net.Sockets.SocketException..ctor (Int32 error) [0x00000] in :0 at System.Net.Sockets.Socket.EndReceive (IAsyncResult asyncResult, SocketError& errorCode) [0x00000] in :0 at System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x00000] in :0 at SuperSocket.ClientEngine.AsyncTcpSession.MyReceiveCallback (IAsyncResult ar) [0x00000] in :0 at System.Net.Sockets.Socket+SocketAsyncResult.Complete () [0x00000] in :0 DashFire.GfxSystem:TickImpl() DashFire.GfxSystem:Tick() DashFire.GameControler:TickGame() GameLogic:Update()

LinkSpaceGame commented 8 years ago

Oh,No

LinkSpaceGame commented 8 years ago

use Xcode 7.1.1 Close BitCode

LinkSpaceGame commented 8 years ago

help me !haha

Rombersoft commented 6 years ago

I have this problem after reconecting to server

woo37830 commented 6 years ago

Try setting the command timeout to zero on the query. Worked for me.

        private void ExecuteQuery(string qStr)
        {
            using (SqlConnection cnx = new SqlConnection(_ConnectionString))
            {
                using (SqlCommand cmd = new SqlCommand(qStr, cnx))
                {
                    cmd.Connection.Open();
                    cmd.CommandTimeout = 0;
                    cmd.ExecuteNonQuery();
                }
            }
        }