Problem with server sending UDP

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

Moderators: Lapo, Bax

tpenn
Posts: 95
Joined: 03 Aug 2010, 18:48

Problem with server sending UDP

Postby tpenn » 08 Aug 2011, 22:23

I have been doing some analysis on the bandwidth usage of my application, and found an issue.

I thought I was sending certain messages from the server to clients with UDP, but in analyzing network captures with WireShark, I was finding that all traffic from the server to the client was being done with TCP. After digging a little deeper, I found where the problem was.

I was sending using BaseClientRequestHandler.send(String cmdName, ISFSObject params, List<User> recipients, boolean useUDP), with useUDP = true. I found that it didn't matter what useUDP was set to, that traffic was always TCP.

I changed to using SFSApi.sendExtensionResponse(String cmdName, ISFSObject params, List<User> recipients, Room room, boolean useUDP). No other code was modified. I then found that UDP was correctly being used.

I am led to conclude that there is an issue with BaseClientRequestHandler.send. Everything works fine with the SFSApi function, but I thought I should mention this, especially because the Unity FPS sample uses BaseClientRequestHandler.send.
tpenn
Posts: 95
Joined: 03 Aug 2010, 18:48

Postby tpenn » 09 Aug 2011, 14:00

Doh, meant to post this in the SFS2X Questions forum. This isn't the right place. I'll repost there.

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 49 guests