コード例 #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>
        /// <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));
        }
コード例 #2
0
        /// <summary>
        /// Synchronously sends data to the remote host specified in the RemoteIPEndPoint
        /// </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>
        /// <param name="serializer">serializer for data</param>
        /// <returns>object that contains the data that return from remote host</returns>
        public IDataContainer SyncSend(UInt32 evt, object obj, int millisecondsTimeout, ISerialize serializer)
        {
            byte[] ret = SyncSend(evt, 0, serializer.GetBytes(obj), millisecondsTimeout);

            return((IDataContainer)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 object SyncSend(UInt32 evt, object obj)
        {
            byte[] ret = SyncSend(evt, DefaultDataSerializer.GetBytes(obj), Timeout.Infinite);

            return(DefaultReturnSerializer.GetObject(ret));
        }
コード例 #4
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));
        }