Click here to Skip to main content
15,917,795 members
Home / Discussions / C#
   

C#

 
GeneralRe: html or xml control/editbox (urgent) Pin
Rei Miyasaka23-Feb-05 0:40
Rei Miyasaka23-Feb-05 0:40 
GeneralRe: html or xml control/editbox (urgent) Pin
saima azeemi23-Feb-05 1:23
saima azeemi23-Feb-05 1:23 
GeneralRe: html or xml control/editbox (urgent) Pin
Philip Fitzsimons23-Feb-05 6:35
Philip Fitzsimons23-Feb-05 6:35 
GeneralDeleting MSI files - Urgent Help Pin
Venkat Eswaran22-Feb-05 23:04
Venkat Eswaran22-Feb-05 23:04 
GeneralRe: Deleting MSI files - Urgent Help Pin
mav.northwind23-Feb-05 0:46
mav.northwind23-Feb-05 0:46 
Generalgray tabs in a TabControl Pin
Aviv Halperin22-Feb-05 22:48
Aviv Halperin22-Feb-05 22:48 
QuestionPort 25!!!!????? Pin
students552 university22-Feb-05 22:24
students552 university22-Feb-05 22:24 
AnswerRe: Port 25!!!!????? Pin
mav.northwind23-Feb-05 0:32
mav.northwind23-Feb-05 0:32 
Hi!

A small example, written from memory, for you to start with:
System.Net.Sockets.TcpListener listener = new System.Net.Sockets.TcpListener(25);
listener.Start();
do
{
	if (listener.Pending())
	{
		System.Net.Sockets.TcpClient client = listener.AcceptTcpClient();

		byte[] buf = new byte[client.ReceiveBufferSize];
		int len = client.GetStream().Read(buf, 0, buf.Length);
		// TODO: Handle longer data and writing to file
		MessageBox.Show(len+" bytes received");
	} 
	else
	{
		System.Threading.Thread.Sleep(100);
	}
} while (true);

Regards,
mav

P.S.: "'Multiple exclamation marks,' he went on, shaking his head, 'are a sure sign of a diseased mind.'" (Terry Pratchett in "Eric"). Poke tongue | ;-P
GeneralDownloading Files Pin
Dylan van Heerden22-Feb-05 20:39
Dylan van Heerden22-Feb-05 20:39 
GeneralRe: Downloading Files Pin
Rei Miyasaka23-Feb-05 0:44
Rei Miyasaka23-Feb-05 0:44 
GeneralRe: Downloading Files Pin
Sebastian Schneider23-Feb-05 0:45
Sebastian Schneider23-Feb-05 0:45 
GeneralSysteminformatiom.Network not working Pin
sharathgowda22-Feb-05 20:25
sharathgowda22-Feb-05 20:25 
GeneralCount no of Children in DirectoryEntry Pin
Adnan Siddiqi22-Feb-05 20:01
Adnan Siddiqi22-Feb-05 20:01 
GeneralRe: Count no of Children in DirectoryEntry Pin
kaangonel24-Feb-05 2:21
kaangonel24-Feb-05 2:21 
QuestionRichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
Rei Miyasaka22-Feb-05 16:22
Rei Miyasaka22-Feb-05 16:22 
AnswerRe: RichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
S. Senthil Kumar22-Feb-05 17:58
S. Senthil Kumar22-Feb-05 17:58 
GeneralRe: RichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
Rei Miyasaka22-Feb-05 18:08
Rei Miyasaka22-Feb-05 18:08 
GeneralOpen socket to a smtp server Pin
kokain22-Feb-05 15:49
kokain22-Feb-05 15:49 
GeneralRe: Open socket to a smtp server Pin
S. Senthil Kumar22-Feb-05 16:11
S. Senthil Kumar22-Feb-05 16:11 
GeneralRe: Open socket to a smtp server Pin
kokain22-Feb-05 16:29
kokain22-Feb-05 16:29 
GeneralRe: Open socket to a smtp server Pin
S. Senthil Kumar22-Feb-05 17:51
S. Senthil Kumar22-Feb-05 17:51 
GeneralPrinting rich text with a background color Pin
Anonymous22-Feb-05 11:29
Anonymous22-Feb-05 11:29 
GeneralRe: Printing rich text with a background color Pin
Rei Miyasaka23-Feb-05 0:50
Rei Miyasaka23-Feb-05 0:50 
GeneralThank you, but my problem is... Pin
JarrodPeace23-Feb-05 6:17
JarrodPeace23-Feb-05 6:17 
Generalset listBox item color Pin
Adnan Siddiqi22-Feb-05 9:19
Adnan Siddiqi22-Feb-05 9:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.