Client & Server with Aysnc Sockets

 
Post new topic   Reply to topic    Unity Community Index // Multiplayer Networking
View previous topic :: View next topic  
Author Message
dklompmaker



Joined: 12 Sep 2008
Posts: 72

PostPosted: Fri Oct 30, 2009 4:02 pm    Post subject: Client & Server with Aysnc Sockets Reply with quote
Greetings,

I have developed a server and client dll for my own network development. I have created my own versions of rpc and message identifiers. My question is..

I use async threading to do OnReceive, OnSend... etc.

This all works fine within visual studio. I can create my own rpc methods and messages. Now... my question is...

I use my version of a Peer in unity. Since my peer loops within its own self to get messages. It appears that unity stops executing the socket and destroys it...

Is there anything that I should know about unity's backend that would cause any of these issues?
Back to top
View user's profile Send private message
dreamora



Joined: 05 Apr 2008
Posts: 6661
Location: Zürich, Switzerland

PostPosted: Fri Oct 30, 2009 5:44 pm    Post subject: Reply with quote
your own dll must run in an own thread and you must not use any callbacks into the unity engine but request messages from the dll from the unity side.

that way it should work.

_________________
Technologies: Unity Pro, iPhone Advanced
Site: GayaSoft & PatchLaunch Technology
My Blogs:My Development & Persistent Online Worlds
Back to top
View user's profile Send private message
dklompmaker



Joined: 12 Sep 2008
Posts: 72

PostPosted: Sat Nov 07, 2009 5:01 am    Post subject: Reply with quote
I am reporting back that I did successfully get integration between my server and clients with my code. Thank you for the tip Dreamora. Soon as I finish this up I will post source for everyone to learn from.
Back to top
View user's profile Send private message
dreamora



Joined: 05 Apr 2008
Posts: 6661
Location: Zürich, Switzerland

PostPosted: Sat Nov 07, 2009 9:01 am    Post subject: Reply with quote
Sounds great Smile
Looking forward to it.

_________________
Technologies: Unity Pro, iPhone Advanced
Site: GayaSoft & PatchLaunch Technology
My Blogs:My Development & Persistent Online Worlds
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Unity Community Index // Multiplayer Networking All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum