示例#1
0
        /// <summary>
        /// Creates a new DirectIM connection
        /// </summary>
        /// <param name="method">The <see cref="DirectConnectionMethod"/> to use for the transfer</param>
        /// <param name="role">The <see cref="DirectConnectRole"/> of the local client in the transfer</param>
        public DirectIMConnection CreateNewDirectIMConnection(DirectConnectionMethod method, DirectConnectRole role)
        {
            DirectIMConnection retval = new DirectIMConnection(_parent, _id++, method, role);

            _directconnections.Add(retval);
            return(retval);
        }
示例#2
0
 /// <summary>
 /// Creates a new DirectIM connection
 /// </summary>
 /// <param name="method">The <see cref="DirectConnectionMethod"/> to use for the transfer</param>
 /// <param name="role">The <see cref="DirectConnectRole"/> of the local client in the transfer</param>
 public DirectIMConnection CreateNewDirectIMConnection(DirectConnectionMethod method, DirectConnectRole role)
 {
     DirectIMConnection retval = new DirectIMConnection(_parent, _id++, method, role);
     _directconnections.Add(retval);
     return retval;
 }
示例#3
0
 /// <summary>
 /// Initializes a new Direct IM from a screenname
 /// </summary>
 internal DirectIM(string screenname, DirectIMConnection connection)
     : base(screenname)
 {
     _connection = connection;
 }
示例#4
0
 /// <summary>
 /// Initializes a new DirectIMDataReader
 /// </summary>
 public DirectIMDataWriter(DirectIMConnection connection, DirectIM message)
 {
     _conn = connection;
     _fullbuffer = message.AttachmentsToByteArray();
 }
示例#5
0
 /// <summary>
 /// Initializes a new DirectIMDataReader
 /// </summary>
 public DirectIMDataReader(DirectIMConnection connection, DirectIM message)
 {
     _conn = connection;
     _conn.ReadPacketAsyncComplete += new ConnectionReadPacketHandler(_conn_ReadPacketAsyncComplete);
     _msg = message;
 }
示例#6
0
 /// <summary>
 /// Initializes a new DirectIMDataReader
 /// </summary>
 public DirectIMDataWriter(DirectIMConnection connection, DirectIM message)
 {
     _conn       = connection;
     _fullbuffer = message.AttachmentsToByteArray();
 }
示例#7
0
 /// <summary>
 /// Initializes a new DirectIMDataReader
 /// </summary>
 public DirectIMDataReader(DirectIMConnection connection, DirectIM message)
 {
     _conn = connection;
     _conn.ReadPacketAsyncComplete += new ConnectionReadPacketHandler(_conn_ReadPacketAsyncComplete);
     _msg = message;
 }