示例#1
0
        /// <summary>
        /// Synchronously sends data to the remote host specified in the RemoteIPEndPoint using Default serializer
        /// </summary>
        /// <param name="evt">message event</param>
        /// <param name="obj">object need to be sent</param>
        /// <returns>object that contains the data that return from remote host</returns>
        public object SyncSend(UInt32 evt, object obj)
        {
            byte[] ret = SyncSend(evt, DefaultDataSerializer.GetBytes(obj), Timeout.Infinite);

            return(DefaultReturnSerializer.GetObject(ret));
        }
示例#2
0
        /// <summary>
        /// Synchronously sends data to the remote host specified in the RemoteIPEndPoint using Default serializer
        /// </summary>
        /// <param name="evt">message event</param>
        /// <param name="obj">object need to be sent</param>
        /// <param name="millisecondsTimeout">The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely. </param>
        /// <returns>object that contains the data that return from remote host</returns>
        public object SyncSend(UInt32 evt, object obj, int millisecondsTimeout)
        {
            byte[] ret = SyncSend(evt, DefaultDataSerializer.GetBytes(obj), millisecondsTimeout);

            return(DefaultReturnSerializer.GetObject(ret));
        }
示例#3
0
        /// <summary>
        /// Synchronously sends data to the remote host specified in the RemoteIPEndPoint using Default serializer
        /// </summary>
        /// <param name="evt">message event</param>
        /// <param name="obj">object need to be sent</param>
        /// <returns>object that contains the data that return from remote host</returns>
        public IDataContainer SyncSend(UInt32 evt, object obj)
        {
            byte[] ret = SyncSend(evt, 0, DefaultDataSerializer.GetBytes(obj), Timeout.Infinite);

            return((IDataContainer)DefaultReturnSerializer.GetObject(ret));
        }