Forum C# How to call an external service from playerio ?

How to call an external service from playerio ?

Postby remuo » April 14th, 2011, 5:58 pm

I want to run a physics engine in amazon ec2 and i want to use a wcf service, but it seems that its not possible due to the references restriction.

I get the following message:
======
- error: Reference found to System.Runtime.Serialization. You can only reference PlayerIO.GameLibrary.dll
- error: Reference found to System.ServiceModel. You can only reference PlayerIO.GameLibrary.dll
...
======

So how can i use an external service with playerio, is it possible ?
What is the best way to accomplish this ?
remuo
 
Posts: 14
Joined: December 29th, 2010, 6:19 pm

Re: How to call an external service from playerio ?

Postby Oliver » April 15th, 2011, 12:53 pm

The only way you can talk out of a game server is with the Web class:
http://playerio.com/documentation/refer ... ibrary.web

You can include other libraries in your code if you can get them in source form and they comply to the same requirements as your code (no static variables etc..)

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: How to call an external service from playerio ?

Postby noel.kee » June 1st, 2011, 5:46 pm

How do it do a PlayerIO.Web.Post(...) with Basic HTTP Authentication? Or is this even possible?
noel.kee
Paid Member
 
Posts: 1
Joined: May 19th, 2011, 7:18 am

Re: How to call an external service from playerio ?

Postby Oliver » June 2nd, 2011, 11:27 am

Hey,

You can't -- however, just add the authentication details in the post request as POST arguments, and you'll have exactly the same level of security as basic authentication.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#