Anyone have UDP issues on Windows?

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Anyone have UDP issues on Windows?

Postby ThomasLund » 19 Nov 2010, 05:40

There are several people who have reported problems with UDP in the FPS demo that was just released.

Has anyone been having trouble with UDP in general using Unity on Windows?

/Thomas
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 19 Nov 2010, 06:34

on vista 64 bit i'm getting :

[SFS DEBUG] UDPSocketLayer: Error reading data from socket: An existing connection was forcibly closed by the remote host.
[SFS DEBUG] Unexpected UDP I/O Error. Error reading data from socket: An existing connection was forcibly closed by the remote host.
[ConnectionReset]
[SFS DEBUG] UDPSocketLayer: Exception aborting socket thread: Thread was being aborted
UDP error:
UnityEngine.Debug:Log(Object)
LobbyGUI:OnUdpInit(BaseEvent) (at Assets/Lobby/Scripts/LobbyGUI.cs:141)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LobbyGUI:FixedUpdate() (at Assets/Lobby/Scripts/LobbyGUI.cs:83)
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 06:39

From the location of the exception it seems that UDP isnt even initializing.

I take it that both the server and client are running on the windows box?

Running SFS2X rc1a?

Could you please try to connect your game client to this ip: XXXX (shut down again) (my laptop on a mac running rc1a - so just running right now)

See if we can isolate things to server, api or game code.

Thanks

/Thomas
Last edited by ThomasLund on 20 Nov 2010, 14:42, edited 1 time in total.
vooood
Posts: 45
Joined: 08 Oct 2010, 09:04
Location: Croatia
Contact:

Postby vooood » 19 Nov 2010, 07:09

I solved this UDP issue for me. Even with the Windows Firewall disabled adding an exception on port 9933 (I added both TCP and UDP but UDP only migh be enough) solved the problem for me and I was able to connect and play. Win XP Pro, but I believe it's the same for all.
tmada
Posts: 9
Joined: 30 Oct 2010, 06:01

Re: Anyone have UDP issues on Windows?

Postby tmada » 19 Nov 2010, 08:29

I already had the ports open for SFS2X previously so I didn't have any problems there (Windows 7 native Firewall). The only additional step required here was to enable UDP in the SFS2X Admin panel (this step is also in the tutorial pdf).
stevets
Posts: 60
Joined: 11 Jul 2010, 12:22
Location: USA

Postby stevets » 19 Nov 2010, 08:42

The FPS demo works on my windows server. Great job and thanks Thomas!
Steve
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 19 Nov 2010, 08:57

Thomas,

i got a policy error when connecting to yours :


[SFS DEBUG] TCPSocketLayer: General exception on connection: Unable to connect, as no valid crossdomain policy was found at System.Net.Sockets.Socket.Connect_internal (IntPtr sock, System.Net.SocketAddress sa, System.Int32& error, Boolean requireSocketPolicyFile) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0
at Sfs2X.Core.Sockets.TCPSocketLayer.ConnectThread () [0x00000] in <filename unknown>:0
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 09:05

Ahhh - did you add the policy prefetch command to the code?

Another todo I guess for the code - can comment it out with a fat comment

/Thomas
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 19 Nov 2010, 09:07

ah... will add it.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 19 Nov 2010, 09:14

yep, now it's working and i don't get the error anymore
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 19 Nov 2010, 09:24

Purrfect
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 19 Nov 2010, 11:23

the error ive got is, ive only just looked at the demo though, im using 10.6.5 and sf2 rca1 and using unity 2.6


Logged in successfully
UnityEngine.Debug:Log(Object)
LobbyGUI:OnLogin(BaseEvent) (at Assets/Lobby/Scripts/LobbyGUI.cs:123)
System.MulticastDelegate:invoke_void_BaseEvent(BaseEvent)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LobbyGUI:FixedUpdate() (at Assets/Lobby/Scripts/LobbyGUI.cs:83)

(Filename: Assets/Lobby/Scripts/LobbyGUI.cs Line: 123)

[SFS - ERROR] UDPSocketLayer: Error reading data from socket: Connection refused
[SFS DEBUG] UDPSocketLayer: Error reading data from socket: Connection refused

(Filename: /Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 1783)

[SFS - WARN] Unexpected UDP I/O Error. Error reading data from socket: Connection refused [ConnectionRefused]
[SFS DEBUG] Unexpected UDP I/O Error. Error reading data from socket: Connection refused [ConnectionRefused]

(Filename: /Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 1783)

[SFS - WARN] UDPSocketLayer: Exception aborting socket thread: Thread was being aborted
[SFS DEBUG] UDPSocketLayer: Exception aborting socket thread: Thread was being aborted

(Filename: /Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 1783)

recursion depth: 1
[SFS - ERROR] UDPSocketLayer: Error writing to socket: Connection refused
[SFS DEBUG] UDPSocketLayer: Error writing to socket: Connection refused

(Filename: /Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 1783)

[SFS - WARN] Unexpected UDP I/O Error. Error writing to socket: Connection refused [ConnectionRefused]
[SFS DEBUG] Unexpected UDP I/O Error. Error writing to socket: Connection refused [ConnectionRefused]

(Filename: /Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 1783)

UDP error:
UnityEngine.Debug:Log(Object)
LobbyGUI:OnUdpInit(BaseEvent) (at Assets/Lobby/Scripts/LobbyGUI.cs:141)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LobbyGUI:FixedUpdate() (at Assets/Lobby/Scripts/LobbyGUI.cs:83)

(Filename: Assets/Lobby/Scripts/LobbyGUI.cs Line: 141)
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 19 Nov 2010, 11:27

did you enable UDP on the server ?
lastowl
Posts: 36
Joined: 12 Aug 2010, 20:56

Postby lastowl » 20 Nov 2010, 09:44

it was a nice caching error from left over logs and files from the preview version fixed now
ulimo
Posts: 5
Joined: 20 Nov 2010, 13:20

Postby ulimo » 20 Nov 2010, 13:23

Hey, I have a bit of problem with UDP on windows 7 x64.
Before the demo release I wrote my own multiplayer code but had problems that the game would allways freeze when I tryied to quit it with UDP enabled.
Problem were gone if I used TCP.
I thought it was just something wrong in my code but the same problem exists in the FPS demo.
So atleast I am getting freezes when trying to exit the game with UDP in use.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 6 guests