title: How to send a message or event into Server Unity3D?
body: <p>I am learning about Networking in Unity. I am confused on how can I send a message or event from client to server. I have these script already that successfully connect my client to server.</p>
  
  <p>This is my server script:</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using UnityEngine.Networking;
  
  public class ServerNetwork : MonoBehaviour {
  
      void Start()
      {
          SetupServer();
      }
  
      // Create a server and listen on a port
      public void SetupServer()
      {
  
          NetworkServer.Listen(4444);
          NetworkServer.RegisterHandler(MsgType.Connect, OnClientConnected);
          Debug.Log("Server is running");
      }
  
      void OnClientConnected(NetworkMessage netMsg)
      {
          Debug.Log("Client connected");
          Debug.Log(netMsg.msgType);
      }
  }
  </code></pre>
  
  <p>This is my client Script:</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  using UnityEngine.Networking;
  
  public class ClientNetwork : MonoBehaviour {
  
      NetworkClient myClient;
      public bool isClientConnected = false;
  
      void Start()
      {
          SetupClient();
      }
  
      // Create a client and connect to the server port
      public void SetupClient()
      {
          myClient = new NetworkClient();
          myClient.RegisterHandler(MsgType.Connect, OnConnected);
          myClient.Connect("127.0.0.1", 4444);
          isClientConnected = true;
      }
  
      // client function
      public void OnConnected(NetworkMessage netMsg)
      {
          Debug.Log("Connected to server");
      }
  }
  </code></pre>
  
  <p>The Server Script is attached to "NetworkManager" Object on ServerScene</p>
  
  <p>The Client Script is attached to "NetworkManager" Object on ClientScene</p>
  
  <p>I have build ClientScene alone to run as a client, and running ServerScene inside editor</p>
  
  <p>With these script, I can already connect the client into the server. From this, how can I communicate from client to server ?</p>
  
  <p>the purpose here is to send real time score into the server from client every second.</p>
  
  <p>Thank You</p>