Exemplo n.º 1
0
    public static SWIGTYPE_p_netcode_client_t netcode_client_create(string address, double time)
    {
        global::System.IntPtr       cPtr = netcodePINVOKE.netcode_client_create(address, time);
        SWIGTYPE_p_netcode_client_t ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_netcode_client_t(cPtr, false);

        return(ret);
    }
Exemplo n.º 2
0
    public static SWIGTYPE_p_void netcode_client_receive_packet(SWIGTYPE_p_netcode_client_t client, SWIGTYPE_p_int packet_bytes)
    {
        global::System.IntPtr cPtr = netcodePINVOKE.netcode_client_receive_packet(SWIGTYPE_p_netcode_client_t.getCPtr(client), SWIGTYPE_p_int.getCPtr(packet_bytes));
        SWIGTYPE_p_void       ret  = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);

        return(ret);
    }
Exemplo n.º 3
0
    public static int netcode_client_index(SWIGTYPE_p_netcode_client_t client)
    {
        int ret = netcodePINVOKE.netcode_client_index(SWIGTYPE_p_netcode_client_t.getCPtr(client));

        return(ret);
    }
Exemplo n.º 4
0
 public static void netcode_client_disconnect(SWIGTYPE_p_netcode_client_t client)
 {
     netcodePINVOKE.netcode_client_disconnect(SWIGTYPE_p_netcode_client_t.getCPtr(client));
 }
Exemplo n.º 5
0
 public static void netcode_client_free_packet(SWIGTYPE_p_netcode_client_t client, SWIGTYPE_p_void packet)
 {
     netcodePINVOKE.netcode_client_free_packet(SWIGTYPE_p_netcode_client_t.getCPtr(client), SWIGTYPE_p_void.getCPtr(packet));
 }
Exemplo n.º 6
0
 public static void netcode_client_send_packet(SWIGTYPE_p_netcode_client_t client, SWIGTYPE_p_uint8_t packet_data, int packet_bytes)
 {
     netcodePINVOKE.netcode_client_send_packet(SWIGTYPE_p_netcode_client_t.getCPtr(client), SWIGTYPE_p_uint8_t.getCPtr(packet_data), packet_bytes);
 }
Exemplo n.º 7
0
 public static void netcode_client_update(SWIGTYPE_p_netcode_client_t client, double time)
 {
     netcodePINVOKE.netcode_client_update(SWIGTYPE_p_netcode_client_t.getCPtr(client), time);
 }
Exemplo n.º 8
0
 public static void netcode_client_connect(SWIGTYPE_p_netcode_client_t client, SWIGTYPE_p_uint8_t connect_token)
 {
     netcodePINVOKE.netcode_client_connect(SWIGTYPE_p_netcode_client_t.getCPtr(client), SWIGTYPE_p_uint8_t.getCPtr(connect_token));
 }
Exemplo n.º 9
0
 public static void netcode_client_destroy(SWIGTYPE_p_netcode_client_t client)
 {
     netcodePINVOKE.netcode_client_destroy(SWIGTYPE_p_netcode_client_t.getCPtr(client));
 }
Exemplo n.º 10
0
        /// <summary>
        /// Create a new netcode.io client.
        /// </summary>
        /// <param name="bindAddress">The address to bind to.</param>
        /// <param name="time">The starting time for the server as a double value.  Normally this will be 0 in the constructor.</param>
        public Client(string bindAddress, double time)
        {
            NetcodeLibrary.Init();

            _client = netcodeNATIVE.netcode_client_create(bindAddress, time);
        }