|
Well, you make a connection to the other machine by use of IP and port number. For example, on the server side you could wait for a connection, and then send out some data:
TcpListener listener = new TcpListener(IPAddress.Any, 1234);
Socket mySocket = listener.AcceptSocket();
byte[] data = {0x5};
mySocket.Send(data);
And the client side would make a connection, and then wait for some data:
Socket mySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
mySocket.Connect(IPAdress.Parse("192.168.1.1"), 1234);
byte[] buffer = new byte[1024];
int dataLength = mySocket.Receive(buffer);
You can of course use the mighty powers of google to find what your looking for, or type 'socket' into the search bar up there.
My current favourite word is: PIE!
Good ol' pie, it's been a while.
|
|
|
|
|
I am developing Windows Application and using HttpWebRequest.
My requirement is, While sending a request to a URL, I want to hide my IP address, or I want that the requested URL gets some other IP from My request.
Can anybody suggest how to do this?
sivaramireddy p
|
|
|
|
|
Hi,
you can encrypt yr URL and decrypt it at the time of opening the page.
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
hai
can u give me a sample code
|
|
|
|
|
You can't do this on your machine alone, in order to send anything back to you, your computer must provide its IP address. What you need to do is to run your communications through an HHTP proxy. The proxy will have your real IP to send the page to you, the server you're visiting will only have the proxy's IP. If you're really concerned, use TOR which will bounce your request through a series of semi-randomly selected proxies world wide before actually requesting anything from the destination server. IIRC TOR is OSS so you can examine its source code if you feel compelled to reinvent the wheel.
--
Help Stamp Out and Abolish Redundancy
The preceding is courtesy of the Department of Unnecessarily Redundant Repetition Department.
|
|
|
|
|
Hi,
I like to know how can i SET the
File Properties :
Title
Subject
Auther
Category
....
my main idea is to let the user create a new file of... and then change the
Properties to it's liking so when he opens the file he wiil see
that the title is..., the subject is..., and so on
THNKS
Have Fun
Never forget it
|
|
|
|
|
|
THANKS
Have Fun
Never forget it
|
|
|
|
|
Hi, I have a requirement to display the count of Mails sending...
I have two threads, and when process starts, 2 threads simultaneously start processing and static variable mailcount getting increment.. At the same time, i need a display a mailcount value parallely on window.
when i click on button, i am showing progressbar, and the count be displayed at the progessbar
The count should be display when process is going on...not after completed.
How can we do this using c#?
Code which i written is as follows
private void bw_DoWork(object sender, DoWorkEventArgs e)
{
T1 = new Thread(delegate() { thread1(); });T1.Start();
T2 = new Thread(delegate() { thread2(); });T2.Start();
int iCount = new Random().Next( 20, 50 );
for( int i = 0; i < iCount; i++ )
{
Thread.Sleep(10000);
m_fmProgress.lblDescription.Invoke(
(MethodInvoker) delegate()
{
m_fmProgress.lblDescription.Text = "Processing file " + i.ToString() + " of " + iCount.ToString();
m_fmProgress.progressBar1.Value = Convert.ToInt32( i * ( 100.0 / iCount ) );
}
);
);
}
private void thread1()
{
for (int i = 1; i <= 100; i++)
mailcount = mailcount + 1;
}
private void thread2()
{
for (int i = 1; i <= 100; i++)
mailcount = mailcount + 1;
}
G. Satish
-- modified at 6:09 Tuesday 20th November, 2007
|
|
|
|
|
what does the reg: mean in your thread title? Ive seen this a few times recently
In answer to your question, raise an event every time a mail is sent and listen to the event from all 5 threads and incrememnt a number onscreen.
|
|
|
|
|
I need code for this...... can u send me code...
How to raise and catch an event and how to display
thanks in advance
|
|
|
|
|
I tell you what, you show me the code you've written for the threaded mail sending including where you start each thread and ill show you where to add some code to raise and listen for events?
|
|
|
|
|
J4amieC wrote: what does the reg: mean in your thread title?
Maybe "regarding"
All the best,
Martin
|
|
|
|
|
Martin# wrote: Maybe "regarding"
So totally superfluous then as the subject line means "regarding"
|
|
|
|
|
ROTFLMAO
The entire thread was funny enough and then I got to that and lost it!
|
|
|
|
|
Hi,
Anyway to store multi-line with special character text, "say class contents"??
string code = @"
using System;
namespace namespace1
{
public class class1
{
public static void Main(String[] args)
{
Console.WriteLine(<blink>"</blink>Hello world!"); //The text is terminated once the (") appear as a closure while it's not:(
Console.In.Read();
}
}
}
";
ps. I dont wanna end up using escape characters like \n \"
pss. I guess this rise the question: "How many characters can a string in C# hold??"
Thank you guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
1. Instead of ", use "", like
@"Console.Writeline(""Hello World!"")"; 2. It's not related to .NET, but rather the computer architecture. On an x86 system it should be Int32.MaxValue. Also you will probably be out of memory before you reach that size.
|
|
|
|
|
Hey!
I have created a simple class library project where I have added some resx(resource) files and some images in folders.
I need this images to be available to other projects like my winclient, how do I accomplish this? It would be grate it I could use the resx files directly in my winclient project or at least get intelisens on the images.
Any Idé?
|
|
|
|
|
Hello,
Anybody has RC6 algorith in C# language? Or maybe C++ Builder? I need program like HexEnc. I tryed use HexEnc, but in my Visual Studio 2005 was 2 errors.
Please, if anybody have this algorithm in C# or C++ Builder, send it to me: srgteam@gmail.com, i need it very much.
Thank you for all!
Sorry for my English
|
|
|
|
|
Srgteam wrote: I tryed use HexEnc, but in my Visual Studio 2005 was 2 errors.
What are the errors? Without saying what they are, no one can really help you.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Now i have one error
In function CHexView::FormatLine
hexenc_src\hexencview.cpp(182) : error C2679: binary '+=' : no operator found which takes a right-hand operand of type 'BYTE [17]' (or there is no acceptable conversion)
|
|
|
|
|
Dear experts,
I'm working on a desktop application which will get the items list from the web.
For that I create web service and add a reference in .NET. The service is working fine. But Actually what happened I'm having more than 30,000 items on the web and it working fine on my machine because of fast net connection.
But if I have a slow connection then I'm unable to get the items. So I decided to download order in a batch say 3 batches of 10,000.
How I can achieve tat in .net...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
If the webservice returns all the items at one go, you are out of luck. I don't see how you can split it into pieces and receive them.
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|
|
I can pass item no from-to in the form of parameters...?
say 1-10000
10001-20000 and so on...
Is their any idea to apply batch processing in .Net. And if one request is failed then 2 must go on ...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|
|
If you can pass in a parameter and get only those items, what is your problem? You can just call the webservice in a loop, passing different parameters and receiving the items you want.
Cheers,
विक्रम
And sleep will come, it comes to us all
And some will fade and some will fall
|
|
|
|