Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version

STUN Client

, 20 Apr 2007 CPOL
STUN client C# implementation with sample application
Stun.zip
Stun
Net
docs
dns
dns_records.jpg
dns_records.vsd
Net
_junk
_Obsolete
_Stuff
AUTH
bin
Release
LumiSoft.Net.dll
Data
Dns
Client
FTP
Client
Server
HTTP
Server
ICMP
IMAP
Client
Server
IO
Log
LumiSoft.Net
Mime
vCard
Net.csproj.user
Net.suo
NNTP
Client
POP3
Client
Server
SDP
ServersCore
SIP
Client
Message
Proxy
Stack
SMTP
Client
Server
STUN
Client
Message
STUN_Client_app
STUN_Client_app.suo
STUN_Client_app
bin
Debug
LumiSoft.Net.dll
STUN_Client_app.exe
STUN_Client_app.vshost.exe
dep
LumiSoft.Net.dll
Properties
Settings.settings
using System;
using System.Net.Sockets;

namespace LumiSoft.Net.POP3.Server
{	
	/// <summary>
	/// Provides data for the GetMailEvent,DeleteMessage,GetTopLines event.
	/// </summary>
	public class POP3_Message_EventArgs
	{
		private POP3_Session m_pSession    = null;
		private POP3_Message m_pMessage    = null;
		private Socket       m_pSocket     = null;
		private byte[]       m_MessageData = null;
		private int          m_Lines       = 0;

		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="session">Reference to pop3 session.</param>
		/// <param name="message">Message which to get.</param>
		/// <param name="socket">Connected socket.</param>
		public POP3_Message_EventArgs(POP3_Session session,POP3_Message message,Socket socket)
		{
			m_pSession = session;
			m_pMessage = message;
			m_pSocket  = socket;
		}

		/// <summary>
		/// TopLines constructor.
		/// </summary>
		/// <param name="session">Reference to pop3 session.</param>
		/// <param name="message">Message which to get.</param>
		/// <param name="socket">Connected socket.</param>
		/// <param name="nLines">Number of lines to get.</param>
		public POP3_Message_EventArgs(POP3_Session session,POP3_Message message,Socket socket,int nLines)
		{
			m_pSession = session;
			m_pMessage = message;
			m_pSocket  = socket;
			m_Lines    = nLines;
		}

		#region properties Implementation

		/// <summary>
		/// Gets reference to pop3 session.
		/// </summary>
		public POP3_Session Session
		{
			get{ return m_pSession; }
		}

		/// <summary>
		/// Gets reference to message, which to get.
		/// </summary>
		public POP3_Message Message
		{
			get{ return m_pMessage; }
		}

		/// <summary>
		/// ID of message which to retrieve.
		/// </summary>
		public string MessageID
		{
			get{ return m_pMessage.ID; }
		}

		/// <summary>
		/// UID of message which to retrieve.
		/// </summary>
		public string MessageUID
		{
			get{ return m_pMessage.UID; }
		}
/*
		/// <summary>
		/// Gets direct access to connected socket.
		/// This is meant for advanced users only.
		/// Just write message to this socket.
		/// NOTE: Message must be period handled and doesn't(MAY NOT) contain message terminator at end.
		/// </summary>
		public Socket ConnectedSocket
		{
			get{ return m_pSocket; }
		}
*/
		/// <summary>
		/// Mail message which is delivered to user. NOTE: may be full message or top lines of message.
		/// </summary>
		public byte[] MessageData
		{
			get{ return m_MessageData; }

			set{ m_MessageData = value; }
		}

		/// <summary>
		/// Number of lines to get.
		/// </summary>
		public int Lines
		{
			get{ return m_Lines; }
		}

		/// <summary>
		/// User Name.
		/// </summary>
		public string UserName
		{
			get{ return m_pSession.UserName; }
		}

		#endregion

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ivar Lumi

Estonia Estonia
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 20 Apr 2007
Article Copyright 2007 by Ivar Lumi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid