Hello everyone.
Sorry for first message looks like that. I tried to found answer via "Forum search" and google but after 2 weeks struggling still have problem.
I have installed and running SFS2X on Ubuntu 11.04 server.
Access to Admin area is fine. Flash examples after changing local IP to server working fine.
Problem is just with Unity3D examples. I took connection example and made changes to IP and socket and when I run it's giving me
"I/O error: An attempt was made to access a socket in a way forbidden by its access permissions"
I have open 9933 and 8080 sockets on my network firewall and checked access from outside - it is open and have full access.
Also what else I have done it's try different version of client's DLL and examples for Unity.
Still same error.
Working on Windows 7 and as mention earlier admin and Flash examples working fine.
Pleas advise me how to get connected via Unity 3D, any examples or tutorials will be much appreciated.
Thanks.
Unity and SFS2X socket connection problem.
"I/O error: An attempt was made to access a socket in a way forbidden by its access permissions"
Maybe Thomas or one of the SFS guys can chime in for this error as i don't know if it's the dll that would throw this error or Unity3d.
Also a ping to an SFS server will tell you if it's alive or not but won't access the port. You could do a telnet on the port and you should get some SFS reply.
I have tried telnet from Windows 7 computer - having black screen on terminal and no answer from SFS server about connection status - tried 9933 and 8080 port.
But from other unix computer connection was established ok for both ports. So can it's be Windows 7 problem or client API for Unity3D? This conclusion appeared because flash is working fine.
Does anyone else have that kind problem with SFS2X+Unity3D+remote server installiation?
Thanks.
But from other unix computer connection was established ok for both ports. So can it's be Windows 7 problem or client API for Unity3D? This conclusion appeared because flash is working fine.
Does anyone else have that kind problem with SFS2X+Unity3D+remote server installiation?
Thanks.
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
That is an OS level error. Most likely firewall or similar blocking your connection
/Thomas
/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Here is something interesting going on with SFS2X and unity WebPlay.
I have SFS2X server running under Ubuntu 11.04.
For game development using Windows7 and Unity 3.3
Server and development computer in the same local network. Server has public and local IPs. Standard SFS ports open and listening. Server routed correctly as there also Apache2 running with some other projects.
When I am trying to make simple connection to SFS2X from Unity editor to server - it is working just when build settings set to PC and Mac standalone.
When I changing build settings to WebPlayer - that's it. No connection at all.
I have tried local and public IPs. No connection.
But when I change build settings back to PC and Mac - working again.
What it's could be? Please advise me something.
I have SFS2X server running under Ubuntu 11.04.
For game development using Windows7 and Unity 3.3
Server and development computer in the same local network. Server has public and local IPs. Standard SFS ports open and listening. Server routed correctly as there also Apache2 running with some other projects.
When I am trying to make simple connection to SFS2X from Unity editor to server - it is working just when build settings set to PC and Mac standalone.
When I changing build settings to WebPlayer - that's it. No connection at all.
I have tried local and public IPs. No connection.
But when I change build settings back to PC and Mac - working again.
What it's could be? Please advise me something.
yep, you need policy validation in the Unity webplayer to be able to connect to SFS.
You can enable it in SFS webtool or you can use the sockpol.exe that comes with Unity and run that.
You can also do a search for webplayer and policy which will bring up alot of topics on teh subject.
It's a bit like flash policy validation.
you prefetch the policy from SFS before opening the actual connection to the server. Once thats done, you open the socket.
You can enable it in SFS webtool or you can use the sockpol.exe that comes with Unity and run that.
You can also do a search for webplayer and policy which will bring up alot of topics on teh subject.
It's a bit like flash policy validation.
you prefetch the policy from SFS before opening the actual connection to the server. Once thats done, you open the socket.
sample :
Code: Select all
public void init ()
{
if (SmartFoxConnection.IsInitialized) {
sfClient = SmartFoxConnection.Connection;
} else {
if(Application.isWebPlayer || Application.isEditor)
{
if(Security.PrefetchSocketPolicy(ServerIp, ServerPort))
{
sfClient = new SmartFox (true);
loginErrorMessage = "auth success...";
} else {
loginErrorMessage = "auth failed...";
return;
}
} else {
sfClient = new SmartFox (true);
}
}
....
sfClient.Connect (ServerIp, ServerPort);
Thank you for the information. I have spent whole night instead good healthy sleep to looking at this problem and really found that I am not alone in this kind situation. Also I have found many people telling what should be done but not too many telling how.
So special thank you for you for clarifying what exactly I should look at.
I was creating stand alone games and demos and was thinking move along to networking will be easy thing... (-:
So special thank you for you for clarifying what exactly I should look at.
I was creating stand alone games and demos and was thinking move along to networking will be easy thing... (-:
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Good you solved it. On that particular issue, there is a sticky in this forum - viewtopic.php?t=8878
Too bad you missed it :-/
Too bad you missed it :-/
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Who is online
Users browsing this forum: No registered users and 67 guests