playMaker

Author Topic: Networking - How to send a key down from client to server ?  (Read 3411 times)

cmvrgr

  • Junior Playmaker
  • **
  • Posts: 64
    • View Profile
Networking - How to send a key down from client to server ?
« on: November 01, 2013, 05:47:19 PM »
Hi friends of playmaker.

I am trying to make an app that it will run on a pc that will act as a server and also on another pc will be the controlling unit that will be the client.

For example I will have 3 cameras that will change to server pc by pressing 1, 2 ,3 keys on client pc.

Any Idea on how I can do it ?

Best Regards

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14244
  • Official Playmaker Support
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #1 on: November 03, 2013, 11:39:20 PM »
Hi,

 For this, you'll need to dive into Photon networking. Have you tried already?

bye,

 Jean

cmvrgr

  • Junior Playmaker
  • **
  • Posts: 64
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #2 on: November 04, 2013, 02:05:52 AM »
Do you know if I can do it with out photon and just with standard networking;

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14244
  • Official Playmaker Support
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #3 on: November 04, 2013, 02:40:33 AM »
Hi,

 Yes, you can do it with Unity Networking... I strongly discourage you to do so... what kind of server are you going to run and who's going to maintain the server? With Photon Cloud, there is no server, it's done for you and for your needs, you only need basic communication from what I can see.

If you are in control of both pc, then you may be able to get away with Unity networking and without a server ( peer to peer connection on a same network).

Could you tell us more about the contact of this? Maybe a dedicated server is required, but we need more infos before stating this.

Have you tried the various samples on Unity networking do they work on your machine setup?

Bye,

Jean

cmvrgr

  • Junior Playmaker
  • **
  • Posts: 64
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #4 on: November 04, 2013, 08:51:56 AM »
Both PCs will be in the same room. The one will be the server machine that will run the application and the client will be something like a remote control of the server.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14244
  • Official Playmaker Support
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #5 on: November 05, 2013, 12:12:38 AM »
Hi,

 Then you can get away with Unity Networking solution with a peer to peer system.

bye,

 Jean

cmvrgr

  • Junior Playmaker
  • **
  • Posts: 64
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #6 on: November 07, 2013, 04:32:07 PM »
Any example on how I can sent a key pressed to server ?

Your help will be appreciated

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14244
  • Official Playmaker Support
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #7 on: November 07, 2013, 11:03:45 PM »
Hi,

 you use the action "SendRemoteEvent", which sends a RPC call and then you implement your server to respond to that RPC event.
 
BUT, From what I understand you are using a peer to peer connection, so you don't have a server... Am I correct? Or Are you using now a server? in which case, which one are you using and how did you configured it?

bye,

 Jean

cmvrgr

  • Junior Playmaker
  • **
  • Posts: 64
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #8 on: November 08, 2013, 04:21:22 AM »
I am using a peer to peer connection on a local network.  My application will act as:  server will have the demo application and client will be the controller.  Both PC's will be in the same room.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14244
  • Official Playmaker Support
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #9 on: November 08, 2013, 04:34:10 AM »
Hi,

Ok, then simply use the SendRemoteEvent Action, it's straight forward.

Bye,

Jean

cmvrgr

  • Junior Playmaker
  • **
  • Posts: 64
    • View Profile
Re: Networking - How to send a key down from client to server ?
« Reply #10 on: November 08, 2013, 04:32:54 PM »
can you send me a demo on how I can sent a pressed key ?

Thanks